﻿#include "MonsterObject.h"
#include "../MirScenes/GameScene.h"
#include "../Forms/Client.CMain.h"
#include "../MirGraphics/DXManager.h"
#include "../MirSounds/SoundManager.h"
#include "PlayerObject.h"
#include "../Settings.h"
#include "../../Shared/Functions/Functions.h"
#include "../MirControls/MirLabel.h"

using namespace Client::MirGraphics;
using namespace Client::MirScenes;
using namespace Client::MirSounds;
namespace S = ServerPackets;
using namespace Client::MirControls;

namespace Client::MirObjects
{

    ObjectType MonsterObject::getRace() const
    {
        return ObjectType::Monster;
    }

    bool MonsterObject::getBlocking() const
    {
        return AI == 64 || (AI == 81 && Direction == static_cast<MirDirection>(6)) ? false :!Dead;
    }

    Point *MonsterObject::getManualLocationOffset() const
    {
        switch (BaseImage)
        {
            case Monster::EvilMir:
                return new Point(-21, -15);
            case Monster::PalaceWall2:
            case Monster::PalaceWallLeft:
            case Monster::PalaceWall1:
            case Monster::GiGateSouth:
            case Monster::GiGateWest:
            case Monster::SSabukWall1:
            case Monster::SSabukWall2:
            case Monster::SSabukWall3:
                return new Point(-10, 0);
            case Monster::GiGateEast:
                return new Point(-45, 7);
            default:
                return new Point(0, 0);
        }
    }

    MonsterObject::MonsterObject(unsigned int objectID) : MapObject(objectID)
    {
    }

    void MonsterObject::Load(S::ObjectMonster *info, bool update)
    {
        Name = info->Name;
        NameColour = info->NameColour;
        BaseImage = info->Image;

        OldNameColor = NameColour;

        CurrentLocation = info->Location;
        MapLocation = info->Location;
        if (!update)
        {
            GameScene::Scene->MapControl->AddObject(this);
        }

        Effect = info->Effect;
        AI = info->AI;
        Light = info->Light;

        Direction = info->Direction;
        Dead = info->Dead;
        Poison = info->Poison;
        Skeleton = info->Skeleton;
        Hidden = info->Hidden;
        ShockTime = CMain::Time + info->ShockTime;
        BindingShotCenter = info->BindingShotCenter;

        Buffs = info->Buffs;

        if (Stage != info->ExtraByte)
        {
            switch (BaseImage)
            {
                case Monster::GreatFoxSpirit:
                    if (update)
                    {
                        Effect tempVar(Libraries::Monsters[static_cast<unsigned short>(Monster::GreatFoxSpirit)], 335, 20, 3000, this);
                        Effects.push_back(&tempVar);
                        SoundManager::PlaySound(BaseSound + 8);
                    }
                    break;
                case Monster::HellLord:
                {
                        Effects.clear();

                        auto effects = MapControl::Effects.Where([&] (std::any x)
                        {
                            return x->Library == Libraries::Monsters[static_cast<unsigned short>(Monster::HellLord)];
                        });

                        for (auto effect : *effects)
                        {
                            effect->Repeat = false;
                        }

                        if (info->ExtraByte > 3)
                        {
                            Effect *tempVar2 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::HellLord)], 21, 6, 600, this);
                            tempVar2->Repeat = true;
                            Effects.push_back(tempVar2);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar2' statement was not added since tempVar2 was passed to a method or constructor. Handle memory management manually.
                        }
                        else
                        {
                            if (info->ExtraByte > 2)
                            {
                                Point tempVar4(100, 84);
                                Effect *tempVar3 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::HellLord)], 105, 6, 600, &tempVar4);
                                tempVar3->Repeat = true;
                                MapControl::Effects.push_back(tempVar3);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar3' statement was not added since tempVar3 was passed to a method or constructor. Handle memory management manually.
                            }
                            if (info->ExtraByte > 1)
                            {
                                Point tempVar6(96, 81);
                                Effect *tempVar5 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::HellLord)], 111, 6, 600, &tempVar6);
                                tempVar5->Repeat = true;
                                MapControl::Effects.push_back(tempVar5);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar5' statement was not added since tempVar5 was passed to a method or constructor. Handle memory management manually.
                            }
                            if (info->ExtraByte > 0)
                            {
                                Point tempVar8(93, 84);
                                Effect *tempVar7 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::HellLord)], 123, 6, 600, &tempVar8);
                                tempVar7->Repeat = true;
                                MapControl::Effects.push_back(tempVar7);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar7' statement was not added since tempVar7 was passed to a method or constructor. Handle memory management manually.
                            }
                        }

                        SoundManager::PlaySound(BaseSound + 9);
                }
                    break;
            }
        }

        Stage = info->ExtraByte;

        //Library
        switch (BaseImage)
        {
            case Monster::EvilMir:
            case Monster::DragonStatue:
                BodyLibrary = Libraries::Dragon;
                break;
            case Monster::EvilMirBody:
                break;
            case Monster::SabukGate:
            case Monster::PalaceWallLeft:
            case Monster::PalaceWall1:
            case Monster::PalaceWall2:
            case Monster::GiGateSouth:
            case Monster::GiGateEast:
            case Monster::GiGateWest:
            case Monster::SSabukWall1:
            case Monster::SSabukWall2:
            case Monster::SSabukWall3:
            case Monster::NammandGate1:
            case Monster::NammandGate2:
            case Monster::SabukWallSection:
            case Monster::NammandWallSection:
            case Monster::FrozenDoor:
                BodyLibrary = Libraries::Gates[(static_cast<unsigned short>(BaseImage)) - 950];
                break;
            case Monster::BabyPig:
            case Monster::Chick:
            case Monster::Kitten:
            case Monster::BabySkeleton:
            case Monster::Baekdon:
            case Monster::Wimaen:
            case Monster::BlackKitten:
            case Monster::BabyDragon:
            case Monster::OlympicFlame:
            case Monster::BabySnowMan:
            case Monster::Frog:
            case Monster::BabyMonkey:
            case Monster::AngryBird:
            case Monster::Foxey:
            case Monster::MedicalRat:
                BodyLibrary = Libraries::Pets[(static_cast<unsigned short>(BaseImage)) - 10000];
                break;
            case Monster::HellBomb1:
            case Monster::HellBomb2:
            case Monster::HellBomb3:
                BodyLibrary = Libraries::Monsters[static_cast<unsigned short>(Monster::HellLord)];
                break;
            case Monster::CaveStatue:
                BodyLibrary = Libraries::Monsters[static_cast<unsigned short>(Monster::CaveStatue)];
                break;
            default:
                BodyLibrary = Libraries::Monsters[static_cast<unsigned short>(BaseImage)];
                break;
        }

        if (Skeleton)
        {
            QueuedAction *tempVar9 = new QueuedAction();
            tempVar9->Action = MirAction::Skeleton;
            tempVar9->Direction = Direction;
            tempVar9->Location = CurrentLocation;
            ActionFeed.push_back(tempVar9);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar9' statement was not added since tempVar9 was passed to a method or constructor. Handle memory management manually.
        }
        else if (Dead)
        {
            QueuedAction *tempVar10 = new QueuedAction();
            tempVar10->Action = MirAction::Dead;
            tempVar10->Direction = Direction;
            tempVar10->Location = CurrentLocation;
            ActionFeed.push_back(tempVar10);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar10' statement was not added since tempVar10 was passed to a method or constructor. Handle memory management manually.
        }

        BaseSound = static_cast<unsigned short>(BaseImage) * 10;

        //Special Actions
        switch (BaseImage)
        {
            case Monster::BoneFamiliar:
            case Monster::Shinsu:
            case Monster::HolyDeva:
            case Monster::HellKnight1:
            case Monster::HellKnight2:
            case Monster::HellKnight3:
            case Monster::HellKnight4:
                if (!info->Extra)
                {
                    QueuedAction *tempVar11 = new QueuedAction();
                    tempVar11->Action = MirAction::Appear;
                    tempVar11->Direction = Direction;
                    tempVar11->Location = CurrentLocation;
                    ActionFeed.push_back(tempVar11);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar11' statement was not added since tempVar11 was passed to a method or constructor. Handle memory management manually.
                }
                break;
            case Monster::FrostTiger:
            case Monster::FlameTiger:
                SitDown = info->Extra;
                break;
            case Monster::ZumaStatue:
            case Monster::ZumaGuardian:
            case Monster::FrozenZumaStatue:
            case Monster::FrozenZumaGuardian:
            case Monster::ZumaTaurus:
            case Monster::DemonGuard:
            case Monster::Turtlegrass:
            case Monster::EarthGolem:
                Stoned = info->Extra;
                break;
        }

        //Frames
        switch (BaseImage)
        {
            case Monster::GreatFoxSpirit:
                Frames = FrameSet::GreatFoxSpirit[Stage];
                break;
            case Monster::DragonStatue:
                Frames = FrameSet::DragonStatue[static_cast<unsigned char>(Direction)];
                break;
            case Monster::HellBomb1:
            case Monster::HellBomb2:
            case Monster::HellBomb3:
                Frames = FrameSet::HellBomb[(static_cast<unsigned short>(BaseImage)) - 903];
                break;
            case Monster::CaveStatue:
                Frames = FrameSet::CaveStatue[static_cast<unsigned char>(Direction)];
                break;
            default:
                if (BodyLibrary != nullptr)
                {
                    Frames = (!BodyLibrary->getFrames()->empty()) ? BodyLibrary->getFrames() : FrameSet::DefaultMonster;
                }
                break;
        }

        SetAction();
        SetCurrentEffects();

        if (CurrentAction == MirAction::Standing)
        {
            PlayAppearSound();

            if (Frame != nullptr)
            {
                FrameIndex = CMain::Random->Next(Frame->Count);
            }
        }
        else if (CurrentAction == MirAction::SitDown)
        {
            PlayAppearSound();
        }

        NextMotion -= NextMotion % 100;

        if (Settings::Effect)
        {
            switch (BaseImage)
            {
                case Monster::Weaver:
                case Monster::VenomWeaver:
                case Monster::ArmingWeaver:
                case Monster::ValeBat:
                case Monster::CrackingWeaver:
                case Monster::GreaterWeaver:
                case Monster::CrystalWeaver:
                    Effect *tempVar12 = new Effect(Libraries::Effect, 680, 20, 20 * Frame->Interval, this);
                    tempVar12->DrawBehind = true;
                    tempVar12->Repeat = true;
                    Effects.push_back(tempVar12);
                    break;
                case Monster::CaveStatue:
                    Effect *tempVar13 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::CaveStatue)], 10, 8, 2400, this);
                    tempVar13->Blend = true;
                    tempVar13->Repeat = true;
                    Effects.push_back(tempVar13);
                    break;

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar13' statement was not added since tempVar13 was passed to a method or constructor. Handle memory management manually.
//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar12' statement was not added since tempVar12 was passed to a method or constructor. Handle memory management manually.
            }
        }

        ProcessBuffs();

    }

    void MonsterObject::ProcessBuffs()
    {
        for (int i = 0; i < Buffs.size(); i++)
        {
            AddBuffEffect(Buffs[i]);
        }
    }

    void MonsterObject::Process()
    {
        bool update = CMain::Time >= NextMotion || GameScene::CanMove;
        SkipFrames = ActionFeed.size() > 1;

        ProcessFrames();

        if (Frame == nullptr)
        {
            DrawFrame = 0;
            DrawWingFrame = 0;
        }
        else
        {
            DrawFrame = Frame->Start + (Frame->getOffSet() * static_cast<unsigned char>(Direction)) + FrameIndex;
            DrawWingFrame = Frame->EffectStart + (Frame->getEffectOffSet() * static_cast<unsigned char>(Direction)) + EffectFrameIndex;
        }


        #pragma region Moving OffSet

        switch (CurrentAction)
        {
            case MirAction::Walking:
            case MirAction::Running:
            case MirAction::Pushed:
            case MirAction::Jump:
            case MirAction::DashL:
            case MirAction::DashR:
            {
                if (Frame == nullptr)
                {
                    OffSetMove = Point::Empty;
                    Movement = CurrentLocation;
                    break;
                }
                int i = CurrentAction == MirAction::Running ? 2 : 1;

                if (CurrentAction == MirAction::Jump)
                {
                    i = -JumpDistance;
                }

                Movement = Functions::PointMove(CurrentLocation, Direction, CurrentAction == MirAction::Pushed ? 0 : -i);

                int count = Frame->Count;
                int index = FrameIndex;

                if (CurrentAction == MirAction::DashR || CurrentAction == MirAction::DashL)
                {
                    count = 3;
                    index %= 3;
                }

                switch (Direction)
                {
                    case MirDirection::Up:
                        OffSetMove = new Point(0, static_cast<int>((MapControl::CellHeight * i / static_cast<float>(count)) * (index + 1)));
                        break;
                    case MirDirection::UpRight:
                        OffSetMove = new Point(static_cast<int>((-MapControl::CellWidth * i / static_cast<float>(count)) * (index + 1)), static_cast<int>((MapControl::CellHeight * i / static_cast<float>(count)) * (index + 1)));
                        break;
                    case MirDirection::Right:
                        OffSetMove = new Point(static_cast<int>((-MapControl::CellWidth * i / static_cast<float>(count)) * (index + 1)), 0);
                        break;
                    case MirDirection::DownRight:
                        OffSetMove = new Point(static_cast<int>((-MapControl::CellWidth * i / static_cast<float>(count)) * (index + 1)), static_cast<int>((-MapControl::CellHeight * i / static_cast<float>(count)) * (index + 1)));
                        break;
                    case MirDirection::Down:
                        OffSetMove = new Point(0, static_cast<int>((-MapControl::CellHeight * i / static_cast<float>(count)) * (index + 1)));
                        break;
                    case MirDirection::DownLeft:
                        OffSetMove = new Point(static_cast<int>((MapControl::CellWidth * i / static_cast<float>(count)) * (index + 1)), static_cast<int>((-MapControl::CellHeight * i / static_cast<float>(count)) * (index + 1)));
                        break;
                    case MirDirection::Left:
                        OffSetMove = new Point(static_cast<int>((MapControl::CellWidth * i / static_cast<float>(count)) * (index + 1)), 0);
                        break;
                    case MirDirection::UpLeft:
                        OffSetMove = new Point(static_cast<int>((MapControl::CellWidth * i / static_cast<float>(count)) * (index + 1)), static_cast<int>((MapControl::CellHeight * i / static_cast<float>(count)) * (index + 1)));
                        break;
                }

                OffSetMove = new Point(OffSetMove->X % 2 + OffSetMove->X, OffSetMove->Y % 2 + OffSetMove->Y);
                break;
            }
            default:
                OffSetMove = Point::Empty;
                Movement = CurrentLocation;
                break;
        }

        #pragma endregion


        DrawY = Movement->Y > CurrentLocation->Y ? Movement->Y : CurrentLocation->Y;

        DrawLocation = new Point((Movement->X - User->Movement->X + MapControl::OffSetX) * MapControl::CellWidth, (Movement->Y - User->Movement->Y + MapControl::OffSetY) * MapControl::CellHeight);
        DrawLocation->Offset(-OffSetMove->X, -OffSetMove->Y);
        DrawLocation->Offset(User->OffSetMove);
        DrawLocation = Functions::Add(DrawLocation, getManualLocationOffset());
        DrawLocation->Offset(getGlobalDisplayLocationOffset());

        if (BodyLibrary != nullptr && update)
        {
            FinalDrawLocation = Functions::Add(DrawLocation, BodyLibrary->GetOffSet(DrawFrame));
            DisplayRectangle = new Rectangle(DrawLocation, BodyLibrary->GetTrueSize(DrawFrame));
        }

        for (int i = 0; i < Effects.size(); i++)
        {
            Effects[i]->Process();
        }

        Color *colour = DrawColour;
        if (Poison == PoisonType::None)
        {
            DrawColour = Color::White;
        }
        if (Poison::HasFlag(PoisonType::Green))
        {
            DrawColour = Color::Green;
        }
        if (Poison::HasFlag(PoisonType::Red))
        {
            DrawColour = Color::Red;
        }
        if (Poison::HasFlag(PoisonType::Bleeding))
        {
            DrawColour = Color::DarkRed;
        }
        if (Poison::HasFlag(PoisonType::Slow))
        {
            DrawColour = Color::Purple;
        }
        if (Poison::HasFlag(PoisonType::Stun) || Poison::HasFlag(PoisonType::Dazed))
        {
            DrawColour = Color::Yellow;
        }
        if (Poison::HasFlag(PoisonType::Blindness))
        {
            DrawColour = Color::MediumVioletRed;
        }
        if (Poison::HasFlag(PoisonType::Frozen))
        {
            DrawColour = Color::Blue;
        }
        if (Poison::HasFlag(PoisonType::Paralysis) || Poison::HasFlag(PoisonType::LRParalysis))
        {
            DrawColour = Color::Gray;
        }
        if (Poison::HasFlag(PoisonType::DelayedExplosion))
        {
            DrawColour = Color::Orange;
        }
        if (colour != DrawColour)
        {
            GameScene::Scene->MapControl->TextureValid = false;
        }
    }

    bool MonsterObject::SetAction()
    {
        if (getNextAction() != nullptr && !GameScene::CanMove)
        {
            switch (getNextAction()->Action)
            {
                case MirAction::Walking:
                case MirAction::Running:
                case MirAction::Pushed:
                    return false;
            }
        }

        //IntelligentCreature
        switch (BaseImage)
        {
            case Monster::BabyPig:
            case Monster::Chick:
            case Monster::Kitten:
            case Monster::BabySkeleton:
            case Monster::Baekdon:
            case Monster::Wimaen:
            case Monster::BlackKitten:
            case Monster::BabyDragon:
            case Monster::OlympicFlame:
            case Monster::BabySnowMan:
            case Monster::Frog:
            case Monster::BabyMonkey:
            case Monster::AngryBird:
            case Monster::Foxey:
            case Monster::MedicalRat:
                BodyLibrary = Libraries::Pets[(static_cast<unsigned short>(BaseImage)) - 10000];
                break;
        }

        if (ActionFeed.empty())
        {
            CurrentAction = Stoned ? MirAction::Stoned : MirAction::Standing;
            if (CurrentAction == MirAction::Standing)
            {
                CurrentAction = SitDown ? MirAction::SitDown : MirAction::Standing;
            }

            std::unordered_map::const_iterator Frames_iterator = Frames->find(CurrentAction);
            Frame = Frames_iterator->second;

            if (MapLocation != CurrentLocation)
            {
                GameScene::Scene->MapControl->RemoveObject(this);
                MapLocation = CurrentLocation;
                GameScene::Scene->MapControl->AddObject(this);
            }

            FrameIndex = 0;

            if (Frame == nullptr)
            {
                return false;
            }

            FrameInterval = Frame->Interval;
        }
        else
        {
            QueuedAction *action = ActionFeed[0];
            ActionFeed.erase(ActionFeed.begin());

            CurrentAction = action->Action;
            CurrentLocation = action->Location;
            Direction = action->Direction;

            Point *temp;
            switch (CurrentAction)
            {
                case MirAction::Walking:
                case MirAction::Running:
                case MirAction::Pushed:
                {
                    int i = CurrentAction == MirAction::Running ? 2 : 1;
                    temp = Functions::PointMove(CurrentLocation, Direction, CurrentAction == MirAction::Pushed ? 0 : -i);
                    break;
                }
                case MirAction::Jump:
                    temp = Functions::PointMove(CurrentLocation, Direction, JumpDistance);
                    break;
                default:
                    temp = CurrentLocation;
                    break;
            }

            temp = new Point(action->Location->X, temp->Y > CurrentLocation->Y ? temp->Y : CurrentLocation->Y);

            if (MapLocation != temp)
            {
                GameScene::Scene->MapControl->RemoveObject(this);
                MapLocation = temp;
                GameScene::Scene->MapControl->AddObject(this);
            }


            switch (CurrentAction)
            {
                case MirAction::Pushed:
                    std::unordered_map::const_iterator Frames_iterator = Frames->find(MirAction::Walking);
                    Frame = Frames_iterator->second;
                    break;
                case MirAction::Jump:
                    std::unordered_map::const_iterator Frames_iterator = Frames->find(MirAction::Jump);
                    Frame = Frames_iterator->second;
                    break;
                case MirAction::AttackRange1:
                    std::unordered_map::const_iterator Frames_iterator = Frames.find(CurrentAction);
                    if (Frames_iterator == Frames->end())
                    {
                        Frame = Frames_iterator->second;
                        std::unordered_map::const_iterator Frames_iterator = Frames->find(MirAction::Attack1);
                        Frame = Frames_iterator->second;
                    }
                    else
                    {
                        Frame = Frames_iterator->second;
                    }
                    break;
                case MirAction::AttackRange2:
                    std::unordered_map::const_iterator Frames_iterator = Frames.find(CurrentAction);
                    if (Frames_iterator == Frames->end())
                    {
                        Frame = Frames_iterator->second;
                        std::unordered_map::const_iterator Frames_iterator = Frames->find(MirAction::Attack2);
                        Frame = Frames_iterator->second;
                    }
                    else
                    {
                        Frame = Frames_iterator->second;
                    }
                    break;
                case MirAction::AttackRange3:
                    std::unordered_map::const_iterator Frames_iterator = Frames.find(CurrentAction);
                    if (Frames_iterator == Frames->end())
                    {
                        Frame = Frames_iterator->second;
                        std::unordered_map::const_iterator Frames_iterator = Frames->find(MirAction::Attack3);
                        Frame = Frames_iterator->second;
                    }
                    else
                    {
                        Frame = Frames_iterator->second;
                    }
                    break;
                case MirAction::Special:
                    std::unordered_map::const_iterator Frames_iterator = Frames.find(CurrentAction);
                    if (Frames_iterator == Frames->end())
                    {
                        Frame = Frames_iterator->second;
                        std::unordered_map::const_iterator Frames_iterator = Frames->find(MirAction::Attack1);
                        Frame = Frames_iterator->second;
                    }
                    else
                    {
                        Frame = Frames_iterator->second;
                    }
                    break;
                case MirAction::Skeleton:
                    std::unordered_map::const_iterator Frames_iterator = Frames.find(CurrentAction);
                    if (Frames_iterator == Frames->end())
                    {
                        Frame = Frames_iterator->second;
                        std::unordered_map::const_iterator Frames_iterator = Frames->find(MirAction::Dead);
                        Frame = Frames_iterator->second;
                    }
                    else
                    {
                        Frame = Frames_iterator->second;
                    }
                    break;
                case MirAction::Hide:
                    switch (BaseImage)
                    {
                        case Monster::Shinsu1:
                            BodyLibrary = Libraries::Monsters[static_cast<unsigned short>(Monster::Shinsu)];
                            BaseImage = Monster::Shinsu;
                            BaseSound = static_cast<unsigned short>(BaseImage) * 10;
                            Frames = (!BodyLibrary->getFrames()->empty()) ? BodyLibrary->getFrames() : FrameSet::DefaultMonster;
                            std::unordered_map::const_iterator Frames_iterator = Frames->find(CurrentAction);
                            Frame = Frames_iterator->second;
                            break;
                        default:
                            std::unordered_map::const_iterator Frames_iterator = Frames->find(CurrentAction);
                            Frame = Frames_iterator->second;
                            break;
                    }
                    break;
                case MirAction::Dead:
                    switch (BaseImage)
                    {
                        case Monster::Shinsu:
                        case Monster::Shinsu1:
                        case Monster::HolyDeva:
                        case Monster::GuardianRock:
                        case Monster::CharmedSnake: //SummonSnakes
                        case Monster::HellKnight1:
                        case Monster::HellKnight2:
                        case Monster::HellKnight3:
                        case Monster::HellKnight4:
                        case Monster::HellBomb1:
                        case Monster::HellBomb2:
                        case Monster::HellBomb3:
                            Remove();

//C# TO C++ CONVERTER TODO TASK: A 'delete temp' statement was not added since temp was passed to a method or constructor. Handle memory management manually.
                            return false;
                        default:
                            std::unordered_map::const_iterator Frames_iterator = Frames->find(CurrentAction);
                            Frame = Frames_iterator->second;
                            break;
                    }
                    break;
                default:
                    std::unordered_map::const_iterator Frames_iterator = Frames->find(CurrentAction);
                    Frame = Frames_iterator->second;
                    break;

            }

            FrameIndex = 0;

            if (Frame == nullptr)
            {
//C# TO C++ CONVERTER TODO TASK: A 'delete temp' statement was not added since temp was passed to a method or constructor. Handle memory management manually.
                return false;
            }

            FrameInterval = Frame->Interval;


            switch (CurrentAction)
            {
                case MirAction::Appear:
                    PlaySummonSound();
                    switch (BaseImage)
                    {
                        case Monster::HellKnight1:
                        case Monster::HellKnight2:
                        case Monster::HellKnight3:
                        case Monster::HellKnight4:
                            Effect tempVar(Libraries::Monsters[static_cast<unsigned short>(BaseImage)], 448, 10, 600, this);
                            Effects.push_back(&tempVar);
                            break;
                    }
                    break;
                case MirAction::Show:
                    PlayPopupSound();
                    break;
                case MirAction::Pushed:
                    FrameIndex = Frame->Count - 1;
                    GameScene::Scene->Redraw();
                    break;
                case MirAction::Jump:
                    PlayJumpSound();
                    switch (BaseImage)
                    {
                        case Monster::Armadillo:
                            Effect tempVar2(Libraries::Monsters[static_cast<unsigned short>(BaseImage)], 592, 12, 800, CurrentLocation, CMain::Time + 500);
                            MapControl::Effects.push_back(&tempVar2);
                            break;
                    }
                    break;
                case MirAction::Walking:
                    GameScene::Scene->Redraw();
                    break;
                case MirAction::Running:
                    PlayRunSound();
                    GameScene::Scene->Redraw();
                    break;
                case MirAction::Attack1:
                    PlayAttackSound();
                    switch (BaseImage)
                    {
                        case Monster::FlamingWooma:
                            Effect tempVar3(Libraries::Monsters[static_cast<unsigned short>(Monster::FlamingWooma)], 224 + static_cast<int>(Direction) * 7, 7, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar3);
                            break;
                        case Monster::ZumaTaurus:
                            if (CurrentAction == MirAction::Attack1)
                            {
                                Effect tempVar4(Libraries::Monsters[static_cast<unsigned short>(Monster::ZumaTaurus)], 244 + static_cast<int>(Direction) * 8, 8, 8 * FrameInterval, this);
                                Effects.push_back(&tempVar4);
                            }
                            break;
                        case Monster::MinotaurKing:
                            Effect tempVar5(Libraries::Monsters[static_cast<unsigned short>(Monster::MinotaurKing)], 272 + static_cast<int>(Direction) * 6, 6, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar5);
                            break;
                        case Monster::FlamingMutant:
                            Effect tempVar6(Libraries::Monsters[static_cast<unsigned short>(Monster::FlamingMutant)], 304 + static_cast<int>(Direction) * 6, 6, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar6);
                            break;
                        case Monster::DemonWolf:
                            Effect tempVar7(Libraries::Monsters[static_cast<unsigned short>(Monster::DemonWolf)], 336 + static_cast<int>(Direction) * 9, 6, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar7);
                            break;
                        case Monster::AncientBringer:
                            Effect tempVar8(Libraries::Monsters[static_cast<unsigned short>(Monster::AncientBringer)], 512 + static_cast<int>(Direction) * 6, 6, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar8);
                            break;
                        case Monster::Manticore:
                            Effect tempVar9(Libraries::Monsters[static_cast<unsigned short>(Monster::Manticore)], 505 + static_cast<int>(Direction) * 3, 3, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar9);
                            break;
                        case Monster::SeedingsGeneral:
                            Effect tempVar10(Libraries::Monsters[static_cast<unsigned short>(Monster::SeedingsGeneral)], 536 + static_cast<int>(Direction) * 4, 4, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar10);
                            break;
                        case Monster::YinDevilNode:
                            Effect tempVar11(Libraries::Monsters[static_cast<unsigned short>(Monster::YinDevilNode)], 26, 26, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar11);
                            break;
                        case Monster::YangDevilNode:
                            Effect tempVar12(Libraries::Monsters[static_cast<unsigned short>(Monster::YangDevilNode)], 26, 26, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar12);
                            break;
                        case Monster::GreatFoxSpirit:
                            Effect tempVar13(Libraries::Monsters[static_cast<unsigned short>(Monster::GreatFoxSpirit)], 355, 20, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar13);
                            break;
                        case Monster::EvilMir:
                        {
                            Effect tempVar14(Libraries::Dragon, 60, 8, 8 * Frame->Interval, this);
                            Effects.push_back(&tempVar14);
                            Effect tempVar15(Libraries::Dragon, 68, 14, 14 * Frame->Interval, this);
                            Effects.push_back(&tempVar15);
                            unsigned char random = static_cast<unsigned char>(CMain::Random->Next(7));
                            for (int i = 0; i <= 7 + random; i++)
                            {
                                Point *source = new Point(User->CurrentLocation->X + CMain::Random->Next(-7, 7), User->CurrentLocation->Y + CMain::Random->Next(-7, 7));

                                Effect tempVar16(Libraries::Dragon, 230 + (CMain::Random->Next(5) * 10), 5, 400, source, CMain::Time + CMain::Random->Next(1000));
                                MapControl::Effects.push_back(&tempVar16);

//C# TO C++ CONVERTER TODO TASK: A 'delete source' statement was not added since source was passed to a method or constructor. Handle memory management manually.
                            }
                            break;
                        }
                        case Monster::CrawlerLave:
                            Effect tempVar17(Libraries::Monsters[static_cast<unsigned short>(Monster::CrawlerLave)], 224 + static_cast<int>(Direction) * 6, 6, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar17);
                            break;
                        case Monster::HellKeeper:
                            Effect tempVar18(Libraries::Monsters[static_cast<unsigned short>(Monster::HellKeeper)], 32, 8, 8 * Frame->Interval, this);
                            Effects.push_back(&tempVar18);
                            break;
                        case Monster::PoisonHugger:
                            Effect tempVar19(Libraries::Monsters[static_cast<unsigned short>(Monster::PoisonHugger)], 224, 5, 5 * Frame->Interval, User, 500, false);
                            User->Effects.push_back(&tempVar19);
                            break;
                        case Monster::IcePillar:
                            Effect tempVar20(Libraries::Monsters[static_cast<unsigned short>(Monster::IcePillar)], 12, 6, 6 * 100, this);
                            Effects.push_back(&tempVar20);
                            break;
                        case Monster::TrollKing:
                            Effect tempVar21(Libraries::Monsters[static_cast<unsigned short>(Monster::TrollKing)], 288, 6, 6 * Frame->Interval, this);
                            Effects.push_back(&tempVar21);
                            break;
                        case Monster::HellBomb1:
                            Effect tempVar22(Libraries::Monsters[static_cast<unsigned short>(Monster::HellLord)], 61, 7, 7 * Frame->Interval, this);
                            Effects.push_back(&tempVar22);
                            break;
                        case Monster::HellBomb2:
                            Effect tempVar23(Libraries::Monsters[static_cast<unsigned short>(Monster::HellLord)], 79, 9, 9 * Frame->Interval, this);
                            Effects.push_back(&tempVar23);
                            break;
                        case Monster::HellBomb3:
                            Effect tempVar24(Libraries::Monsters[static_cast<unsigned short>(Monster::HellLord)], 97, 8, 8 * Frame->Interval, this);
                            Effects.push_back(&tempVar24);
                            break;
                        case Monster::WitchDoctor:
                            Effect tempVar25(Libraries::Monsters[static_cast<unsigned short>(Monster::WitchDoctor)], 328, 20, 20 * Frame->Interval, this);
                            Effects.push_back(&tempVar25);
                            break;
                        case Monster::RestlessJar:
                            Effect tempVar26(Libraries::Monsters[static_cast<unsigned short>(Monster::RestlessJar)], 384, 7, 7 * Frame->Interval, this);
                            Effects.push_back(&tempVar26);
                            break;
                        case Monster::AssassinBird:
                            Effect tempVar27(Libraries::Monsters[static_cast<unsigned short>(Monster::AssassinBird)], 392, 9, 9 * Frame->Interval, this);
                            Effects.push_back(&tempVar27);
                            break;
                        case Monster::Nadz:
                            Effect tempVar28(Libraries::Monsters[static_cast<unsigned short>(Monster::Nadz)], 280 + static_cast<int>(Direction) * 5, 5, 5 * Frame->Interval, this);
                            Effects.push_back(&tempVar28);
                            break;
                        case Monster::AvengingWarrior:
                            Effect tempVar29(Libraries::Monsters[static_cast<unsigned short>(Monster::AvengingWarrior)], 272 + static_cast<int>(Direction) * 5, 5, 7 * Frame->Interval, this);
                            Effects.push_back(&tempVar29);
                            break;
                    }
                    break;
                case MirAction::Attack2:
                    PlaySecondAttackSound();
                    switch (BaseImage)
                    {
                        case Monster::CrystalSpider:
                            Effect tempVar30(Libraries::Monsters[static_cast<unsigned short>(Monster::CrystalSpider)], 272 + static_cast<int>(Direction) * 10, 10, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar30);
                            break;
                        case Monster::Yimoogi:
                        case Monster::RedYimoogi:
                        case Monster::Snake10:
                        case Monster::Snake11:
                        case Monster::Snake12:
                        case Monster::Snake13:
                        case Monster::Snake14:
                        case Monster::Snake15:
                        case Monster::Snake16:
                        case Monster::Snake17:
                            Effect tempVar31(Libraries::Monsters[static_cast<unsigned short>(BaseImage)], 304, 6, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar31);
                            Effect tempVar32(Libraries::Magic2, 1280, 10, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar32);
                            break;
                        case Monster::HellCannibal:
                            Effect tempVar33(Libraries::Monsters[static_cast<unsigned short>(Monster::HellCannibal)], 310 + static_cast<int>(Direction) * 12, 12, 12 * Frame->Interval, this);
                            Effects.push_back(&tempVar33);
                            break;
                        case Monster::ManectricKing:
                            Effect tempVar34(Libraries::Monsters[static_cast<unsigned short>(Monster::ManectricKing)], 640 + static_cast<int>(Direction) * 10, 10, 10 * 100, this);
                            Effects.push_back(&tempVar34);
                            break;
                        case Monster::AncientBringer:
                            Effect tempVar35(Libraries::Monsters[static_cast<unsigned short>(Monster::AncientBringer)], 568 + static_cast<int>(Direction) * 10, 10, 13 * Frame->Interval, this);
                            Effects.push_back(&tempVar35);
                            break;
                        case Monster::DarkBeast:
                            Effect tempVar36(Libraries::Monsters[static_cast<unsigned short>(Monster::DarkBeast)], 296 + static_cast<int>(Direction) * 4, 4, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar36);
                            break;
                        case Monster::LightBeast:
                            Effect tempVar37(Libraries::Monsters[static_cast<unsigned short>(Monster::LightBeast)], 296 + static_cast<int>(Direction) * 4, 4, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar37);
                            break;
                        case Monster::FireCat:
                            Effect tempVar38(Libraries::Monsters[static_cast<unsigned short>(Monster::FireCat)], 248 + static_cast<int>(Direction) * 10, 10, 10 * Frame->Interval, this);
                            Effects.push_back(&tempVar38);
                            break;
                        case Monster::BloodBaboon:
                            Effect tempVar39(Libraries::Monsters[static_cast<unsigned short>(Monster::BloodBaboon)], 312 + static_cast<int>(Direction) * 7, 7, 7 * Frame->Interval, this);
                            Effects.push_back(&tempVar39);
                            break;
                        case Monster::TwinHeadBeast:
                            Effect tempVar40(Libraries::Monsters[static_cast<unsigned short>(Monster::TwinHeadBeast)], 352 + static_cast<int>(Direction) * 7, 7, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar40);
                            break;
                        case Monster::Nadz:
                            Effect tempVar41(Libraries::Monsters[static_cast<unsigned short>(Monster::Nadz)], 320 + static_cast<int>(Direction) * 7, 7, 7 * Frame->Interval, this);
                            Effects.push_back(&tempVar41);
                            break;
                        case Monster::Turtlegrass:
                            Effect tempVar42(Libraries::Monsters[static_cast<unsigned short>(Monster::Turtlegrass)], 360 + static_cast<int>(Direction) * 6, 6, 6 * Frame->Interval, this);
                            Effects.push_back(&tempVar42);
                            break;
                        case Monster::FrozenFighter:
                            Effect tempVar43(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenFighter)], 384 + static_cast<int>(Direction) * 5, 5, 5 * Frame->Interval, this);
                            Effects.push_back(&tempVar43);
                            break;
                        case Monster::DragonWarrior:
                            Effect tempVar44(Libraries::Monsters[static_cast<unsigned short>(Monster::DragonWarrior)], 576, 7, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar44);
                            break;
                    }

                    if (static_cast<unsigned short>(BaseImage) >= 10000)
                    {
                        PlayPetSound();
                    }
                    break;
                case MirAction::Attack3:
                    PlayThirdAttackSound();
                    switch (BaseImage)
                    {
                        case Monster::Yimoogi:
                        case Monster::RedYimoogi:
                        case Monster::Snake10:
                        case Monster::Snake11:
                        case Monster::Snake12:
                        case Monster::Snake13:
                        case Monster::Snake14:
                        case Monster::Snake15:
                        case Monster::Snake16:
                        case Monster::Snake17:
                            SoundManager::PlaySound(BaseSound + 9);
                            Effect tempVar45(Libraries::Magic2, 1330, 10, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar45);
                            break;
                        case Monster::Behemoth:
                            Effect tempVar46(Libraries::Monsters[static_cast<unsigned short>(Monster::Behemoth)], 697 + static_cast<int>(Direction) * 7, 7, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar46);
                            break;
                        case Monster::SandSnail:
                            Effect *tempVar47 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::SandSnail)], 448, 9, 900, this);
                            tempVar47->Blend = true;
                            Effects.push_back(tempVar47);
                            break;
                        case Monster::PeacockSpider:
                            Effect tempVar48(Libraries::Monsters[static_cast<unsigned short>(Monster::PeacockSpider)], 755, 21, 21 * Frame->Interval, this);
                            Effects.push_back(&tempVar48);
                            break;
                        case Monster::DragonWarrior:
                            Effect tempVar49(Libraries::Monsters[static_cast<unsigned short>(Monster::DragonWarrior)], 632 + static_cast<int>(Direction) * 4, 4, 8 * Frame->Interval, this);
                            Effects.push_back(&tempVar49);
                            break;

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar47' statement was not added since tempVar47 was passed to a method or constructor. Handle memory management manually.
                    }
                    break;
                case MirAction::Attack4:
                    PlayFourthAttackSound();
                    break;
                case MirAction::AttackRange1:
                    PlayRangeSound();
                    switch (BaseImage)
                    {
                        case Monster::KingScorpion:
                            Effect tempVar50(Libraries::Monsters[static_cast<unsigned short>(Monster::KingScorpion)], 272 + static_cast<int>(Direction) * 8, 8, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar50);
                            break;
                        case Monster::DarkDevil:
                            Effect tempVar51(Libraries::Monsters[static_cast<unsigned short>(Monster::DarkDevil)], 272 + static_cast<int>(Direction) * 8, 8, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar51);
                            break;
                        case Monster::ShamanZombie:
                            Effect tempVar52(Libraries::Monsters[static_cast<unsigned short>(Monster::ShamanZombie)], 232 + static_cast<int>(Direction) * 12, 6, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar52);
                            Effect tempVar53(Libraries::Monsters[static_cast<unsigned short>(Monster::ShamanZombie)], 328, 12, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar53);
                            break;
                        case Monster::GuardianRock:
                            Effect tempVar54(Libraries::Monsters[static_cast<unsigned short>(Monster::GuardianRock)], 12, 10, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar54);
                            break;
                        case Monster::GreatFoxSpirit:
                        {
                            unsigned char random = static_cast<unsigned char>(CMain::Random->Next(4));
                            for (int i = 0; i <= 4 + random; i++)
                            {
                                Point *source = new Point(User->CurrentLocation->X + CMain::Random->Next(-7, 7), User->CurrentLocation->Y + CMain::Random->Next(-7, 7));

                                Effect tempVar55(Libraries::Monsters[static_cast<unsigned short>(Monster::GreatFoxSpirit)], 375 + (CMain::Random->Next(3) * 20), 20, 1400, source, CMain::Time + CMain::Random->Next(600));
                                MapControl::Effects.push_back(&tempVar55);

//C# TO C++ CONVERTER TODO TASK: A 'delete source' statement was not added since source was passed to a method or constructor. Handle memory management manually.
                            }
                            break;
                        }
                        case Monster::EvilMir:
                            Effect tempVar56(Libraries::Dragon, 90 + static_cast<int>(Direction) * 10, 10, 10 * Frame->Interval, this);
                            Effects.push_back(&tempVar56);
                            break;
                        case Monster::DragonStatue:
                            Effect tempVar57(Libraries::Dragon, 310 + (static_cast<int>(Direction) / 3) * 20, 10, 10 * Frame->Interval, this);
                            Effects.push_back(&tempVar57);
                            break;
                        case Monster::TurtleKing:
                            Effect tempVar58(Libraries::Monsters[static_cast<unsigned short>(Monster::TurtleKing)], 946, 10, Frame->Count * Frame->Interval, User);
                            Effects.push_back(&tempVar58);
                            break;
                        case Monster::FlyingStatue:
                            Effect tempVar59(Libraries::Monsters[static_cast<unsigned short>(Monster::FlyingStatue)], 314, 6, 6 * Frame->Interval, this);
                            Effects.push_back(&tempVar59);
                            //Effects.Add(new Effect(Libraries.Monsters[(ushort)Monster.FlyingStatue], 329, 5, 5 * Frame.Interval, this)); this should follow the projectile
                            break;
                        case Monster::HellBolt:
                            Effect tempVar60(Libraries::Monsters[static_cast<unsigned short>(Monster::HellBolt)], 304, 11, 11 * 100, this);
                            Effects.push_back(&tempVar60);
                            break;
                        case Monster::WitchDoctor:
                            Effect tempVar61(Libraries::Monsters[static_cast<unsigned short>(Monster::WitchDoctor)], 304, 9, 9 * 100, this);
                            Effects.push_back(&tempVar61);
                            break;
                        case Monster::DarkDevourer:
                            Effect tempVar62(Libraries::Monsters[static_cast<unsigned short>(Monster::DarkDevourer)], 480, 7, 7 * Frame->Interval, User);
                            User->Effects.push_back(&tempVar62);
                            break;
                        case Monster::DreamDevourer:
                            Effect tempVar63(Libraries::Monsters[static_cast<unsigned short>(Monster::DreamDevourer)], 264, 7, 7 * Frame->Interval, User);
                            User->Effects.push_back(&tempVar63);
                            break;
                        case Monster::ManectricKing:
                            Effect tempVar64(Libraries::Monsters[static_cast<unsigned short>(Monster::ManectricKing)], 720, 12, 12 * 100, this);
                            Effects.push_back(&tempVar64);
                            break;
                        case Monster::IcePillar:
                            Effect *tempVar65 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::IcePillar)], 26, 6, 8 * 100, this);
                            tempVar65->Start = CMain::Time + 750;
                            Effects.push_back(tempVar65);
                            break;
                        case Monster::ElementGuard:
                            Effect tempVar66(Libraries::Monsters[static_cast<unsigned short>(Monster::ElementGuard)], 320 + static_cast<int>(Direction) * 5, 5, 5 * Frame->Interval, this);
                            Effects.push_back(&tempVar66);
                            break;
                        case Monster::KingGuard:
                            Effect tempVar67(Libraries::Monsters[static_cast<unsigned short>(Monster::KingGuard)], 737, 9, 9 * Frame->Interval, this);
                            Effects.push_back(&tempVar67);
                            break;
                        case Monster::CatShaman:
                            Effect tempVar68(Libraries::Monsters[static_cast<unsigned short>(Monster::CatShaman)], 738, 8, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar68);
                            break;
                        case Monster::SeedingsGeneral:
                            Effect tempVar69(Libraries::Monsters[static_cast<unsigned short>(Monster::SeedingsGeneral)], 1184 + static_cast<int>(Direction) * 9, 9, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar69);
                            break;
                        case Monster::RestlessJar:
                            Effect tempVar70(Libraries::Monsters[static_cast<unsigned short>(Monster::RestlessJar)], 471, 5, 500, this);
                            Effects.push_back(&tempVar70);
                            break;
                        case Monster::AvengingSpirit:
                            Effect tempVar71(Libraries::Monsters[static_cast<unsigned short>(Monster::AvengingSpirit)], 344 + static_cast<int>(Direction) * 3, 3, 3 * Frame->Interval, this);
                            Effects.push_back(&tempVar71);
                            break;
                        case Monster::FrozenKnight:
                            Effect tempVar72(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenKnight)], 384 + static_cast<int>(Direction) * 9, 9, 9 * Frame->Interval, this);
                            Effects.push_back(&tempVar72);
                            break;
                        case Monster::IcePhantom:
                            Effect tempVar73(Libraries::Monsters[static_cast<unsigned short>(Monster::IcePhantom)], 672, 10, 10 * Frame->Interval, this);
                            Effects.push_back(&tempVar73);
                            break;
                        case Monster::BlackTortoise:
                            Effect tempVar74(Libraries::Monsters[static_cast<unsigned short>(Monster::BlackTortoise)], 404 + static_cast<int>(Direction) * 5, 5, 5 * Frame->Interval, this);
                            Effects.push_back(&tempVar74);
                            break;

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar65' statement was not added since tempVar65 was passed to a method or constructor. Handle memory management manually.
                    }

                    TargetID = std::any_cast<unsigned int>(action->Params[0]);
                    break;
                case MirAction::AttackRange2:
                    PlaySecondRangeSound();
                    TargetID = std::any_cast<unsigned int>(action->Params[0]);
                    switch (BaseImage)
                    {
                        case Monster::TurtleKing:
                        {
                            unsigned char random = static_cast<unsigned char>(CMain::Random->Next(4));
                            for (int i = 0; i <= 4 + random; i++)
                            {
                                Point *source = new Point(User->CurrentLocation->X + CMain::Random->Next(-7, 7), User->CurrentLocation->Y + CMain::Random->Next(-7, 7));

                                Effect *ef = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::TurtleKing)], CMain::Random->Next(2) == 0 ? 922 : 934, 12, 1200, source, CMain::Time + CMain::Random->Next(600));
                                ef->Played->addListener([&] (o, e)
                                {
                                    SoundManager::PlaySound(20000 + static_cast<unsigned short>(Spell::HellFire) * 10 + 1);
                                });
                                MapControl::Effects.push_back(ef);

//C# TO C++ CONVERTER TODO TASK: A 'delete ef' statement was not added since ef was passed to a method or constructor. Handle memory management manually.
//C# TO C++ CONVERTER TODO TASK: A 'delete source' statement was not added since source was passed to a method or constructor. Handle memory management manually.
                            }
                            break;
                        }
                        case Monster::PeacockSpider: //BROKEN
                            Effect tempVar75(Libraries::Monsters[static_cast<unsigned short>(Monster::PeacockSpider)], 776, 30, 30 * Frame->Interval, this);
                            Effects.push_back(&tempVar75);
                            break;
                        case Monster::OmaWitchDoctor:
                            Effect tempVar76(Libraries::Monsters[static_cast<unsigned short>(Monster::OmaWitchDoctor)], 859, 10, 10 * Frame->Interval, this);
                            Effects.push_back(&tempVar76);
                            break;
                        case Monster::IcePhantom:
                            Effect tempVar77(Libraries::Monsters[static_cast<unsigned short>(Monster::IcePhantom)], 672, 10, 10 * Frame->Interval, this);
                            Effects.push_back(&tempVar77);
                            break;
                    }
                    break;
                case MirAction::AttackRange3:
                    PlayThirdRangeSound();
                    TargetID = std::any_cast<unsigned int>(action->Params[0]);
                    switch (BaseImage)
                    {
                        case Monster::TurtleKing:
                            Effect tempVar78(Libraries::Monsters[static_cast<unsigned short>(Monster::TurtleKing)], 946, 10, Frame->Count * Frame->Interval, User);
                            Effects.push_back(&tempVar78);
                            break;
                    }
                    break;
                case MirAction::Struck:
                {
                    unsigned int attackerID = std::any_cast<unsigned int>(action->Params[0]);
                    StruckWeapon = -2;
                    for (int i = 0; i < MapControl::Objects.size(); i++)
                    {
                        MapObject *ob = MapControl::Objects[i];
                        if (ob->ObjectID != attackerID)
                        {
                            continue;
                        }
                        if (ob->getRace() != ObjectType::Player)
                        {
                            break;
                        }
                        PlayerObject *player = (static_cast<PlayerObject*>(ob));
                        StruckWeapon = player->Weapon;
                        if (player->Class != MirClass::Assassin || StruckWeapon == -1)
                        {
                            break; //Archer?
                        }
                        StruckWeapon = 1;
                        break;
                    }
                    PlayFlinchSound();
                    PlayStruckSound();
                    break;
                }
                case MirAction::Die:
                    switch (BaseImage)
                    {
                        case Monster::ManectricKing:
                            Effect tempVar79(Libraries::Monsters[static_cast<unsigned short>(Monster::ManectricKing)], 504 + static_cast<int>(Direction) * 9, 9, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar79);
                            break;
                        case Monster::DarkDevil:
                            Effect tempVar80(Libraries::Monsters[static_cast<unsigned short>(Monster::DarkDevil)], 336, 6, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar80);
                            break;
                        case Monster::ShamanZombie:
                            Effect tempVar81(Libraries::Monsters[static_cast<unsigned short>(Monster::ShamanZombie)], 224, 8, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar81);
                            break;
                        case Monster::RoninGhoul:
                            Effect tempVar82(Libraries::Monsters[static_cast<unsigned short>(Monster::RoninGhoul)], 224, 10, Frame->Count * FrameInterval, this);
                            Effects.push_back(&tempVar82);
                            break;
                        case Monster::BoneCaptain:
                            Effect tempVar83(Libraries::Monsters[static_cast<unsigned short>(Monster::BoneCaptain)], 224 + static_cast<int>(Direction) * 10, 10, Frame->Count * FrameInterval, this);
                            Effects.push_back(&tempVar83);
                            break;
                        case Monster::RightGuard:
                            Effect tempVar84(Libraries::Monsters[static_cast<unsigned short>(Monster::RightGuard)], 296, 5, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar84);
                            break;
                        case Monster::LeftGuard:
                            Effect tempVar85(Libraries::Monsters[static_cast<unsigned short>(Monster::LeftGuard)], 296 + static_cast<int>(Direction) * 5, 5, 5 * Frame->Interval, this);
                            Effects.push_back(&tempVar85);
                            break;
                        case Monster::FrostTiger:
                            Effect tempVar86(Libraries::Monsters[static_cast<unsigned short>(Monster::FrostTiger)], 304, 10, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar86);
                            break;
                        case Monster::Yimoogi:
                        case Monster::RedYimoogi:
                        case Monster::Snake10:
                        case Monster::Snake11:
                        case Monster::Snake12:
                        case Monster::Snake13:
                        case Monster::Snake14:
                        case Monster::Snake15:
                        case Monster::Snake16:
                        case Monster::Snake17:
                            Effect tempVar87(Libraries::Monsters[static_cast<unsigned short>(Monster::Yimoogi)], 352, 10, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar87);
                            break;
                        case Monster::YinDevilNode:
                            Effect tempVar88(Libraries::Monsters[static_cast<unsigned short>(Monster::YinDevilNode)], 52, 20, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar88);
                            break;
                        case Monster::YangDevilNode:
                            Effect tempVar89(Libraries::Monsters[static_cast<unsigned short>(Monster::YangDevilNode)], 52, 20, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar89);
                            break;
                        case Monster::BlackFoxman:
                            Effect tempVar90(Libraries::Monsters[static_cast<unsigned short>(Monster::BlackFoxman)], 224, 10, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar90);
                            break;
                        case Monster::VampireSpider:
                            Effect tempVar91(Libraries::Monsters[static_cast<unsigned short>(Monster::VampireSpider)], 296, 5, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar91);
                            break;
                        case Monster::CharmedSnake:
                            Effect tempVar92(Libraries::Monsters[static_cast<unsigned short>(Monster::CharmedSnake)], 40, 8, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar92);
                            break;
                        case Monster::Manticore:
                            Effect tempVar93(Libraries::Monsters[static_cast<unsigned short>(Monster::Manticore)], 592, 9, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar93);
                            break;
                        case Monster::ValeBat:
                            Effect tempVar94(Libraries::Monsters[static_cast<unsigned short>(Monster::ValeBat)], 224, 20, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar94);
                            break;
                        case Monster::SpiderBat:
                            Effect tempVar95(Libraries::Monsters[static_cast<unsigned short>(Monster::SpiderBat)], 224, 20, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar95);
                            break;
                        case Monster::VenomWeaver:
                            Effect tempVar96(Libraries::Monsters[static_cast<unsigned short>(Monster::VenomWeaver)], 224, 6, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar96);
                            break;
                        case Monster::HellBolt:
                            Effect tempVar97(Libraries::Monsters[static_cast<unsigned short>(Monster::HellBolt)], 325, 10, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar97);
                            break;
                        case Monster::SabukGate:
                            Effect *tempVar98 = new Effect(Libraries::Gates[static_cast<unsigned short>(Monster::SabukGate) - 950], 24, 10, Frame->Count * Frame->Interval, this);
                            tempVar98->Light = -1;
                            Effects.push_back(tempVar98);
                            break;
                        case Monster::WingedTigerLord:
                            Effect tempVar99(Libraries::Monsters[static_cast<unsigned short>(Monster::WingedTigerLord)], 650 + static_cast<int>(Direction) * 5, 5, Frame->Count * FrameInterval, this);
                            Effects.push_back(&tempVar99);
                            break;
                        case Monster::HellKnight1:
                        case Monster::HellKnight2:
                        case Monster::HellKnight3:
                        case Monster::HellKnight4:
                            Effect tempVar100(Libraries::Monsters[static_cast<unsigned short>(BaseImage)], 448, 10, 600, this);
                            Effects.push_back(&tempVar100);
                            break;
                        case Monster::IceGuard:
                            Effect tempVar101(Libraries::Monsters[static_cast<unsigned short>(Monster::IceGuard)], 256, 6, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar101);
                            break;
                        case Monster::DeathCrawler:
                            Effect tempVar102(Libraries::Monsters[static_cast<unsigned short>(Monster::DeathCrawler)], 313, 11, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar102);
                            Effect tempVar103(Libraries::Monsters[static_cast<unsigned short>(Monster::DeathCrawler)], 304, 9, 900, CurrentLocation, CMain::Time + 900);
                            MapControl::Effects.push_back(&tempVar103);
                            break;
                        case Monster::BurningZombie:
                            Effect tempVar104(Libraries::Monsters[static_cast<unsigned short>(Monster::BurningZombie)], 373, 10, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar104);
                            break;
                        case Monster::FrozenZombie:
                            Effect tempVar105(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenZombie)], 360, 10, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar105);
                            break;
                        case Monster::EarthGolem:
                            Effect tempVar106(Libraries::Monsters[static_cast<unsigned short>(Monster::EarthGolem)], 432, 9, 9 * Frame->Interval, this);
                            Effects.push_back(&tempVar106);
                            break;
                        case Monster::CreeperPlant:
                            Effect tempVar107(Libraries::Monsters[static_cast<unsigned short>(Monster::CreeperPlant)], 266, 6, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar107);
                            break;
                        case Monster::SackWarrior:
                            Effect tempVar108(Libraries::Monsters[static_cast<unsigned short>(Monster::SackWarrior)], 384, 9, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar108);
                            Effect tempVar109(Libraries::Monsters[static_cast<unsigned short>(Monster::SackWarrior)], 393, 10, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar109);
                            break;
                        case Monster::Hydrax:
                            Effect tempVar110(Libraries::Monsters[static_cast<unsigned short>(Monster::Hydrax)], 240, 5, 5 * Frame->Interval, this);
                            Effects.push_back(&tempVar110);
                            break;
                        case Monster::Bear:
                            Effect tempVar111(Libraries::Monsters[static_cast<unsigned short>(Monster::Bear)], 353, 9, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar111);
                            break;
                        case Monster::FrozenSoldier:
                            Effect tempVar112(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenSoldier)], 256, 10, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar112);
                            break;
                        case Monster::FrozenGolem:
                            Effect tempVar113(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenGolem)], 456, 7, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar113);
                            Effect tempVar114(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenGolem)], 463, 10, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar114);
                            break;
                        case Monster::IcePhantom:
                            Effect tempVar115(Libraries::Monsters[static_cast<unsigned short>(Monster::IcePhantom)], 692 + static_cast<int>(Direction) * 10, 10, 10 * Frame->Interval, this);
                            Effects.push_back(&tempVar115);
                            break;
                        case Monster::DragonWarrior:
                            Effect tempVar116(Libraries::Monsters[static_cast<unsigned short>(Monster::DragonWarrior)], 504 + static_cast<int>(Direction) * 6, 6, 6 * Frame->Interval, this);
                            Effects.push_back(&tempVar116);
                            break;
                        case Monster::FloatingRock:
                            Effect tempVar117(Libraries::Monsters[static_cast<unsigned short>(Monster::FloatingRock)], 151, 8, Frame->Count * Frame->Interval, this);
                            Effects.push_back(&tempVar117);
                            break;
                        case Monster::AvengingSpirit:
                            Effect tempVar118(Libraries::Monsters[static_cast<unsigned short>(Monster::AvengingSpirit)], 442 + static_cast<int>(Direction) * 10, 10, 10 * Frame->Interval, this);
                            Effects.push_back(&tempVar118);
                            break;

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar98' statement was not added since tempVar98 was passed to a method or constructor. Handle memory management manually.
                    }
                    PlayDieSound();
                    break;
                case MirAction::Dead:
                    GameScene::Scene->Redraw();
                    GameScene::Scene->MapControl->SortObject(this);
                    if (MouseObject == this)
                    {
                        MouseObject = nullptr;
                    }
                    if (TargetObject == this)
                    {
                        TargetObject = nullptr;
                    }
                    if (MagicObject == this)
                    {
                        MagicObject = nullptr;
                    }

                    for (int i = 0; i < Effects.size(); i++)
                    {
                        Effects[i]->Remove();
                    }

                    DeadTime = CMain::Time;

                    break;
            }

//C# TO C++ CONVERTER TODO TASK: A 'delete temp' statement was not added since temp was passed to a method or constructor. Handle memory management manually.
        }

        GameScene::Scene->MapControl->TextureValid = false;

        NextMotion = CMain::Time + FrameInterval;

        return true;
    }

    void MonsterObject::SetCurrentEffects()
    {
        //BindingShot
        if (BindingShotCenter && ShockTime > CMain::Time)
        {
            int effectid = TrackableEffect::GetOwnerEffectID(ObjectID);
            if (effectid >= 0)
            {
                TrackableEffect::effectlist[effectid]->RemoveNoComplete();
            }

            TrackableEffect *NetDropped = new TrackableEffect(new Effect(Libraries::MagicC, 7, 1, 1000, this) {Repeat = true, RepeatUntil = (ShockTime - 1500)});
            NetDropped->Complete->addListener([&] (o1, e1)
            {
                SoundManager::PlaySound(20000 + 130 * 10 + 6); //sound M130-6
                TrackableEffect tempVar(new Effect(Libraries::MagicC, 8, 8, 700, this));
                Effects.push_back(&tempVar);
            });
            Effects.push_back(NetDropped);

//C# TO C++ CONVERTER TODO TASK: A 'delete NetDropped' statement was not added since NetDropped was passed to a method or constructor. Handle memory management manually.
        }
        else if (BindingShotCenter && ShockTime <= CMain::Time)
        {
            int effectid = TrackableEffect::GetOwnerEffectID(ObjectID);
            if (effectid >= 0)
            {
                TrackableEffect::effectlist[effectid]->Remove();
            }

            //SoundManager.PlaySound(20000 + 130 * 10 + 6);//sound M130-6
            //Effects.Add(new TrackableEffect(new Effect(Libraries.ArcherMagic, 8, 8, 700, this)));

            ShockTime = 0;
            BindingShotCenter = false;
        }

    }

    void MonsterObject::ProcessFrames()
    {
        if (Frame == nullptr)
        {
            return;
        }

        switch (CurrentAction)
        {
            case MirAction::Walking:
                if (!GameScene::CanMove)
                {
                    return;
                }

                GameScene::Scene->MapControl->TextureValid = false;

                if (SkipFrames)
                {
                    UpdateFrame();
                }

                if (UpdateFrame() >= Frame->Count)
                {
                    FrameIndex = Frame->Count - 1;
                    SetAction();
                }
                else
                {
                    switch (FrameIndex)
                    {
                        case 0:
                            PlayWalkSound(true);
                            break;
                        case 3:
                            PlayWalkSound(false);
                            break;
                    }
                }
                break;
            case MirAction::Running:
                if (!GameScene::CanMove)
                {
                    return;
                }

                GameScene::Scene->MapControl->TextureValid = false;

                if (SkipFrames)
                {
                    UpdateFrame();
                }

                if (UpdateFrame() >= Frame->Count)
                {
                    FrameIndex = Frame->Count - 1;
                    SetAction();
                }
                break;
            case MirAction::Pushed:
                if (!GameScene::CanMove)
                {
                    return;
                }

                GameScene::Scene->MapControl->TextureValid = false;

                FrameIndex -= 2;

                if (FrameIndex < 0)
                {
                    FrameIndex = 0;
                    SetAction();
                }
                break;
            case MirAction::Jump:
                if (CMain::Time >= NextMotion)
                {
                    GameScene::Scene->MapControl->TextureValid = false;

                    if (SkipFrames)
                    {
                        UpdateFrame();
                    }

                    if (UpdateFrame() >= Frame->Count)
                    {
                        FrameIndex = Frame->Count - 1;
                        SetAction();
                    }
                    else
                    {
                        NextMotion += FrameInterval;
                    }
                }
                break;
            case MirAction::Show:
                if (CMain::Time >= NextMotion)
                {
                    GameScene::Scene->MapControl->TextureValid = false;

                    if (SkipFrames)
                    {
                        UpdateFrame();
                    }

                    if (UpdateFrame() >= Frame->Count)
                    {
                        switch (BaseImage)
                        {
                            case Monster::ZumaStatue:
                            case Monster::ZumaGuardian:
                            case Monster::RedThunderZuma:
                            case Monster::FrozenRedZuma:
                            case Monster::FrozenZumaStatue:
                            case Monster::FrozenZumaGuardian:
                            case Monster::ZumaTaurus:
                            case Monster::DemonGuard:
                            case Monster::EarthGolem:
                            case Monster::Turtlegrass:
                            case Monster::ManTree:
                                Stoned = false;
                                break;
                            case Monster::Shinsu:
                                BodyLibrary = Libraries::Monsters[static_cast<unsigned short>(Monster::Shinsu1)];
                                BaseImage = Monster::Shinsu1;
                                BaseSound = static_cast<unsigned short>(BaseImage) * 10;
                                Frames = (!BodyLibrary->getFrames()->empty()) ? BodyLibrary->getFrames() : FrameSet::DefaultMonster;
                                break;
                        }

                        FrameIndex = Frame->Count - 1;
                        SetAction();
                    }
                    else
                    {
                        switch (FrameIndex)
                        {
                            case 1:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::CreeperPlant:
                                            Effect tempVar(Libraries::Monsters[static_cast<unsigned short>(Monster::CreeperPlant)], 250, 6, 6 * 100, this);
                                            Effects.push_back(&tempVar);
                                            break;
                                    }
                                    break;
                            }
                        }

                        NextMotion += FrameInterval;
                    }
                }
                break;
            case MirAction::Hide:
                if (CMain::Time >= NextMotion)
                {
                    GameScene::Scene->MapControl->TextureValid = false;

                    if (SkipFrames)
                    {
                        UpdateFrame();
                    }

                    if (UpdateFrame() >= Frame->Count)
                    {
                        switch (BaseImage)
                        {
                            case Monster::CannibalPlant:
                            case Monster::CreeperPlant:
                            case Monster::EvilCentipede:
                            case Monster::DigOutZombie:
                            case Monster::Armadillo:
                            case Monster::ArmadilloElder:
                                Remove();
                                return;
                            case Monster::ZumaStatue:
                            case Monster::ZumaGuardian:
                            case Monster::RedThunderZuma:
                            case Monster::FrozenRedZuma:
                            case Monster::FrozenZumaStatue:
                            case Monster::FrozenZumaGuardian:
                            case Monster::ZumaTaurus:
                            case Monster::DemonGuard:
                            case Monster::EarthGolem:
                            case Monster::Turtlegrass:
                            case Monster::ManTree:
                                Stoned = true;
                                return;
                        }


                        FrameIndex = Frame->Count - 1;
                        SetAction();
                    }
                    else
                    {
                        NextMotion += FrameInterval;
                    }
                }
                break;
            case MirAction::Appear:
            case MirAction::Standing:
            case MirAction::Stoned:
                if (CMain::Time >= NextMotion)
                {
                    GameScene::Scene->MapControl->TextureValid = false;

                    if (SkipFrames)
                    {
                        UpdateFrame();
                    }

                    if (UpdateFrame() >= Frame->Count)
                    {
                        if (CurrentAction == MirAction::Standing)
                        {
                            switch (BaseImage)
                            {
                                case Monster::SnakeTotem: //SummonSnakes Totem
                                    if (TrackableEffect::GetOwnerEffectID(this->ObjectID, "SnakeTotem") < 0)
                                    {
                                        TrackableEffect tempVar2(new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::SnakeTotem)], 2, 10, 1500, this) {Repeat = true}, "SnakeTotem");
                                        Effects.push_back(&tempVar2);
                                    }
                                    break;
                                case Monster::PalaceWall1:
                                    //Effects.Add(new Effect(Libraries.Effect, 196, 1, 1000, this) { DrawBehind = true, d });
                                    //Libraries.Effect.Draw(196, DrawLocation, Color.White, true);
                                    //Libraries.Effect.DrawBlend(196, DrawLocation, Color.White, true);
                                    break;
                            }
                        }

                        FrameIndex = Frame->Count - 1;
                        SetAction();
                    }
                    else
                    {
                        NextMotion += FrameInterval;
                    }
                }
                break;
            case MirAction::Attack1:
                if (CMain::Time >= NextMotion)
                {
                    GameScene::Scene->MapControl->TextureValid = false;

                    if (SkipFrames)
                    {
                        UpdateFrame();
                    }

                    if (UpdateFrame() >= Frame->Count)
                    {
                        FrameIndex = Frame->Count - 1;
                        if (SetAction())
                        {
                            switch (BaseImage)
                            {
                                case Monster::EvilCentipede:
                                    Effect tempVar3(Libraries::Monsters[static_cast<unsigned short>(Monster::EvilCentipede)], 42, 10, 600, this);
                                    Effects.push_back(&tempVar3);
                                    break;
                                case Monster::ToxicGhoul:
                                    SoundManager::PlaySound(BaseSound + 4);
                                    Effect tempVar4(Libraries::Monsters[static_cast<unsigned short>(Monster::ToxicGhoul)], 224 + static_cast<int>(Direction) * 6, 6, 600, this);
                                    Effects.push_back(&tempVar4);
                                    break;
                            }
                        }
                    }
                    else
                    {
                        switch (FrameIndex)
                        {
                            case 1:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::Kirin:
                                            Effect tempVar5(Libraries::Monsters[static_cast<unsigned short>(Monster::Kirin)], 776 + static_cast<int>(Direction) * 5, 5, 500, this);
                                            Effects.push_back(&tempVar5);
                                            break;
                                        case Monster::Bear:
                                            Effect tempVar6(Libraries::Monsters[static_cast<unsigned short>(Monster::Bear)], 321 + static_cast<int>(Direction) * 4, 4, Frame->Count * Frame->Interval, this);
                                            Effects.push_back(&tempVar6);
                                            break;
                                        case Monster::Jar1:
                                            Effect tempVar7(Libraries::Monsters[static_cast<unsigned short>(Monster::Jar1)], 128 + static_cast<int>(Direction) * 3, 3, 300, this);
                                            Effects.push_back(&tempVar7);
                                            break;
                                    }
                                    break;
                            }
                            case 2:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::StainHammerCat:
                                            Effect tempVar8(Libraries::Monsters[static_cast<unsigned short>(Monster::StainHammerCat)], 240 + static_cast<int>(Direction) * 4, 4, Frame->Count * Frame->Interval, this);
                                            Effects.push_back(&tempVar8);
                                            break;
                                        case Monster::FrozenFighter:
                                            Effect tempVar9(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenFighter)], 336 + static_cast<int>(Direction) * 6, 6, 6 * Frame->Interval, this);
                                            Effects.push_back(&tempVar9);
                                            break;
                                    }
                            }
                                break;
                            case 3:
                            {
                                    PlaySwingSound();
                                    switch (BaseImage)
                                    {
                                        case Monster::RightGuard:
                                            Effect tempVar10(Libraries::Monsters[static_cast<unsigned short>(Monster::RightGuard)], 272 + static_cast<int>(Direction) * 3, 3, 3 * Frame->Interval, this);
                                            Effects.push_back(&tempVar10);
                                            break;
                                        case Monster::LeftGuard:
                                            Effect tempVar11(Libraries::Monsters[static_cast<unsigned short>(Monster::LeftGuard)], 272 + static_cast<int>(Direction) * 3, 3, 3 * Frame->Interval, this);
                                            Effects.push_back(&tempVar11);
                                            break;
                                        case Monster::Shinsu1:
                                            Effect tempVar12(Libraries::Monsters[static_cast<unsigned short>(Monster::Shinsu1)], 224 + static_cast<int>(Direction) * 6, 6, 6 * Frame->Interval, this);
                                            Effects.push_back(&tempVar12);
                                            break;
                                        //case Monster.AncientBringer:
                                        //    Effects.Add(new Effect(Libraries.Monsters[(ushort)Monster.AncientBringer], 512 + (int)Direction * 6, 6, 6 * Frame.Interval, this));
                                        //    break;
                                        case Monster::DeathCrawler:
                                            Effect tempVar13(Libraries::Monsters[static_cast<unsigned short>(Monster::DeathCrawler)], 248 + static_cast<int>(Direction) * 3, 3, 3 * Frame->Interval, this);
                                            Effects.push_back(&tempVar13);
                                            break;
                                        case Monster::FrozenZombie:
                                            Effect tempVar14(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenZombie)], 312 + static_cast<int>(Direction) * 5, 5, 2 * Frame->Interval, this);
                                            Effects.push_back(&tempVar14);
                                            break;
                                        case Monster::TucsonWarrior:
                                            Effect tempVar15(Libraries::Monsters[static_cast<unsigned short>(Monster::TucsonWarrior)], 296 + static_cast<int>(Direction) * 6, 6, 6 * Frame->Interval, this);
                                            Effects.push_back(&tempVar15);
                                            break;
                                        case Monster::ArmadilloElder:
                                            Effect tempVar16(Libraries::Monsters[static_cast<unsigned short>(Monster::ArmadilloElder)], 488 + static_cast<int>(Direction) * 3, 3, 3 * Frame->Interval, this);
                                            Effects.push_back(&tempVar16);
                                            break;
                                        case Monster::Mandrill:
                                            Effect tempVar17(Libraries::Monsters[static_cast<unsigned short>(Monster::Mandrill)], 264 + static_cast<int>(Direction) * 2, 2, 2 * Frame->Interval, this);
                                            Effects.push_back(&tempVar17);
                                            break;
                                        case Monster::ArmedPlant:
                                            Effect tempVar18(Libraries::Monsters[static_cast<unsigned short>(Monster::ArmedPlant)], 256 + static_cast<int>(Direction) * 2, 2, 2 * Frame->Interval, this);
                                            Effects.push_back(&tempVar18);
                                            break;
                                        case Monster::AvengerPlant:
                                            Effect tempVar19(Libraries::Monsters[static_cast<unsigned short>(Monster::AvengerPlant)], 224 + static_cast<int>(Direction) * 3, 3, 3 * Frame->Interval, this);
                                            Effects.push_back(&tempVar19);
                                            break;
                                        case Monster::AvengingSpirit:
                                            Effect tempVar20(Libraries::Monsters[static_cast<unsigned short>(Monster::AvengingSpirit)], 280 + static_cast<int>(Direction) * 8, 8, 8 * Frame->Interval, this);
                                            Effects.push_back(&tempVar20);
                                            break;
                                        case Monster::SackWarrior:
                                            Effect tempVar21(Libraries::Monsters[static_cast<unsigned short>(Monster::SackWarrior)], 344 + static_cast<int>(Direction) * 3, 3, 3 * Frame->Interval, this);
                                            Effects.push_back(&tempVar21);
                                            break;
                                        case Monster::Bear:
                                            Effect tempVar22(Libraries::Monsters[static_cast<unsigned short>(Monster::Bear)], 321 + static_cast<int>(Direction) * 4, 4, 4 * Frame->Interval, this);
                                            Effects.push_back(&tempVar22);
                                            break;
                                        case Monster::FrozenKnight:
                                            Effect tempVar23(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenKnight)], 360 + static_cast<int>(Direction) * 3, 3, 6 * Frame->Interval, this);
                                            Effects.push_back(&tempVar23);
                                            break;
                                        case Monster::IcePhantom:
                                            Effect tempVar24(Libraries::Monsters[static_cast<unsigned short>(Monster::IcePhantom)], 640 + static_cast<int>(Direction) * 4, 4, 4 * Frame->Interval, this);
                                            Effects.push_back(&tempVar24);
                                            break;
                                        case Monster::DragonWarrior:
                                            Effect tempVar25(Libraries::Monsters[static_cast<unsigned short>(Monster::DragonWarrior)], 552 + static_cast<int>(Direction) * 3, 3, 3 * Frame->Interval, this);
                                            Effects.push_back(&tempVar25);
                                            break;
                                        case Monster::BurningZombie:
                                            Effect tempVar26(Libraries::Monsters[static_cast<unsigned short>(Monster::BurningZombie)], 312 + static_cast<int>(Direction) * 5, 5, 2 * Frame->Interval, this);
                                            Effects.push_back(&tempVar26);
                                            break;
                                    }
                                    break;
                            }
                            case 4:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::GeneralMeowMeow:
                                            Effect tempVar27(Libraries::Monsters[static_cast<unsigned short>(Monster::GeneralMeowMeow)], 416 + static_cast<int>(Direction) * 5, 5, 5 * Frame->Interval, this);
                                            Effects.push_back(&tempVar27);
                                            break;
                                        case Monster::Armadillo:
                                            Effect tempVar28(Libraries::Monsters[static_cast<unsigned short>(Monster::Armadillo)], 480 + static_cast<int>(Direction) * 2, 2, 2 * Frame->Interval, this);
                                            Effects.push_back(&tempVar28);
                                            break;
                                        case Monster::StainHammerCat:
                                            Effect tempVar29(Libraries::Monsters[static_cast<unsigned short>(Monster::StainHammerCat)], 272 + static_cast<int>(Direction) * 6, 6, 6 * Frame->Interval, this);
                                            Effects.push_back(&tempVar29);
                                            break;
                                        case Monster::StrayCat:
                                            Effect tempVar30(Libraries::Monsters[static_cast<unsigned short>(Monster::StrayCat)], 528 + static_cast<int>(Direction) * 5, 5, 5 * Frame->Interval, this);
                                            Effects.push_back(&tempVar30);
                                            break;
                                        case Monster::OmaSlasher:
                                            Effect tempVar31(Libraries::Monsters[static_cast<unsigned short>(Monster::OmaSlasher)], 304 + static_cast<int>(Direction) * 4, 4, 4 * Frame->Interval, this);
                                            Effects.push_back(&tempVar31);
                                            break;
                                        case Monster::AvengerPlant:
                                            Effect *tempVar32 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::AvengerPlant)], 248, 6, 600, User);
                                            tempVar32->Blend = true;
                                            User->Effects.push_back(tempVar32);
                                            break;
                                        case Monster::ManTree:
                                            Effect tempVar33(Libraries::Monsters[static_cast<unsigned short>(Monster::ManTree)], 472 + static_cast<int>(Direction) * 2, 2, 2 * Frame->Interval, this);
                                            Effects.push_back(&tempVar33);
                                            break;
                                        case Monster::HornedMage:
                                            Effect tempVar34(Libraries::Monsters[static_cast<unsigned short>(Monster::HornedMage)], 783, 9, 800, this);
                                            Effects.push_back(&tempVar34);
                                            break;
                                        case Monster::DarkWraith:
                                        {
                                            Effect tempVar35(Libraries::Monsters[static_cast<unsigned short>(Monster::DarkWraith)], 720 + static_cast<int>(Direction) * 3, 3, 300, this);
                                            Effects.push_back(&tempVar35);
                                            Point *source = Functions::PointMove(CurrentLocation, Direction, 1);
                                            Effect *ef = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::DarkWraith)], 744, 6, 600, source, CMain::Time);
                                            MapControl::Effects.push_back(ef);
                                            break;

//C# TO C++ CONVERTER TODO TASK: A 'delete ef' statement was not added since ef was passed to a method or constructor. Handle memory management manually.
                                        }
                                        case Monster::FightingCat:
                                            Effect *tempVar36 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::FightingCat)], 208 + static_cast<int>(Direction) * 3, 3, 4 * Frame->Interval, this);
                                            tempVar36->Blend = true;
                                            Effects.push_back(tempVar36);
                                            break;

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar36' statement was not added since tempVar36 was passed to a method or constructor. Handle memory management manually.
//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar32' statement was not added since tempVar32 was passed to a method or constructor. Handle memory management manually.
                                    }
                            }
                                break;
                            case 5:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::OmaAssassin:
                                            Effect tempVar37(Libraries::Monsters[static_cast<unsigned short>(Monster::OmaAssassin)], 312 + static_cast<int>(Direction) * 5, 5, 5 * Frame->Interval, this);
                                            Effects.push_back(&tempVar37);
                                            break;
                                        case Monster::PlagueCrab:
                                            Effect tempVar38(Libraries::Monsters[static_cast<unsigned short>(Monster::PlagueCrab)], 488 + static_cast<int>(Direction) * 7, 7, 7 * Frame->Interval, this);
                                            Effects.push_back(&tempVar38);
                                            break;
                                        case Monster::Hydrax:
                                            Effect tempVar39(Libraries::Monsters[static_cast<unsigned short>(Monster::Hydrax)], 240 + static_cast<int>(Direction) * 5, 5, 5 * Frame->Interval, this);
                                            Effects.push_back(&tempVar39);
                                            break;
                                        case Monster::FrozenAxeman:
                                            Effect tempVar40(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenAxeman)], 528 + static_cast<int>(Direction) * 3, 3, 300, this);
                                            Effects.push_back(&tempVar40);
                                            break;
                                        case Monster::ScalyBeast:
                                            Effect tempVar41(Libraries::Monsters[static_cast<unsigned short>(Monster::ScalyBeast)], 344 + static_cast<int>(Direction) * 3, 3, 3 * Frame->Interval, this);
                                            Effects.push_back(&tempVar41);
                                            break;
                                    }
                                    break;
                            }
                            case 6:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::FrozenMiner:
                                        {
                                            Effect tempVar42(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenMiner)], 432 + static_cast<int>(Direction) * 3, 3, 300, this);
                                            Effects.push_back(&tempVar42);
                                            Point *source = Functions::PointMove(CurrentLocation, Direction, 1);
                                            Effect *ef = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenMiner)], 456, 6, 600, source, CMain::Time + 300);
                                            MapControl::Effects.push_back(ef);
                                            break;

//C# TO C++ CONVERTER TODO TASK: A 'delete ef' statement was not added since ef was passed to a method or constructor. Handle memory management manually.
                                        }
                                        case Monster::FrozenMagician:
                                            Effect tempVar43(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenMagician)], 840 + static_cast<int>(Direction) * 4, 4, 400, this);
                                            Effects.push_back(&tempVar43);
                                            source = Functions::PointMove(CurrentLocation, Direction, 1);
                                            ef = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenMagician)], 872, 6, 600, source, CMain::Time + 300);
                                            MapControl::Effects.push_back(ef);
                                            break;
                                        case Monster::SnowYeti:
                                            Effect tempVar44(Libraries::Monsters[static_cast<unsigned short>(Monster::SnowYeti)], 504 + static_cast<int>(Direction) * 4, 4, 400, this);
                                            Effects.push_back(&tempVar44);
                                            break;
                                        case Monster::IceCrystalSoldier:
                                            source = Functions::PointMove(CurrentLocation, Direction, 1);
                                            ef = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::IceCrystalSoldier)], 464, 6, 600, source, CMain::Time);
                                            MapControl::Effects.push_back(ef);
                                            break;
                                    }
                                    break;
                            }
                            case 7:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::AxePlant:
                                            Effect tempVar45(Libraries::Monsters[static_cast<unsigned short>(Monster::AxePlant)], 256 + static_cast<int>(Direction) * 10, 10, 10 * Frame->Interval, this);
                                            Effects.push_back(&tempVar45);
                                            break;
                                        case Monster::TreeQueen: //Fire Bombardment
                                            Effect *tempVar46 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::TreeQueen)], 35, 13, 1300, this);
                                            tempVar46->Blend = true;
                                            Effects.push_back(tempVar46);
                                            break;

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar46' statement was not added since tempVar46 was passed to a method or constructor. Handle memory management manually.
                                    }
                                    break;
                            }
                            case 9:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::SeedingsGeneral:
                                            Effect tempVar47(Libraries::Monsters[static_cast<unsigned short>(Monster::SeedingsGeneral)], 736 + static_cast<int>(Direction) * 9, 9, 900, this);
                                            Effects.push_back(&tempVar47);
                                            break;
                                    }
                                    break;
                            }
                        }
                        NextMotion += FrameInterval;
                    }
                }
                break;
            case MirAction::SitDown:
                if (CMain::Time >= NextMotion)
                {
                    GameScene::Scene->MapControl->TextureValid = false;

                    if (SkipFrames)
                    {
                        UpdateFrame();
                    }

                    if (UpdateFrame() >= Frame->Count)
                    {
                        FrameIndex = Frame->Count - 1;
                        SetAction();
                    }
                    else
                    {
                        NextMotion += FrameInterval;
                    }
                }
                break;
            case MirAction::Attack2:
                if (CMain::Time >= NextMotion)
                {
                    GameScene::Scene->MapControl->TextureValid = false;

                    if (SkipFrames)
                    {
                        UpdateFrame();
                    }

                    MapObject *ob = nullptr;

                    Point *front = Functions::PointMove(CurrentLocation, Direction, 1);

                    if (UpdateFrame() >= Frame->Count)
                    {
                        FrameIndex = Frame->Count - 1;
                        SetAction();
                    }
                    else
                    {
                        switch (FrameIndex)
                        {
                            case 1:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::BabySnowMan:
                                            if (FrameIndex == 1)
                                            {
                                                if (TrackableEffect::GetOwnerEffectID(this->ObjectID, "SnowmanSnow") < 0)
                                                {
                                                    TrackableEffect tempVar48(new Effect(Libraries::Pets[(static_cast<unsigned short>(BaseImage)) - 10000], 208, 11, 1500, this), "SnowmanSnow");
                                                    Effects.push_back(&tempVar48);
                                                }
                                            }
                                            break;
                                        case Monster::CannibalTentacles:
                                            Effect tempVar49(Libraries::Monsters[static_cast<unsigned short>(Monster::CannibalTentacles)], 400 + static_cast<int>(Direction) * 9, 9, 9 * Frame->Interval, this);
                                            Effects.push_back(&tempVar49);
                                            break;
                                    }
                            }
                                break;
                            case 2:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::BlackHammerCat:
                                            Effect tempVar50(Libraries::Monsters[static_cast<unsigned short>(Monster::BlackHammerCat)], 648 + static_cast<int>(Direction) * 11, 11, 11 * Frame->Interval, this);
                                            Effects.push_back(&tempVar50);
                                            break;
                                    }
                            }
                                break;
                            case 3:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::KingGuard:
                                            Effect *tempVar51 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::KingGuard)], 773, 10, 1000, this);
                                            tempVar51->Blend = true;
                                            Effects.push_back(tempVar51);
                                            break;
                                        case Monster::Behemoth:
                                            Effect tempVar52(Libraries::Monsters[static_cast<unsigned short>(Monster::Behemoth)], 768, 10, Frame->Count * Frame->Interval, this);
                                            Effects.push_back(&tempVar52);
                                            break;
                                        case Monster::FlameQueen:
                                            Effect tempVar53(Libraries::Monsters[static_cast<unsigned short>(Monster::FlameQueen)], 720, 9, Frame->Count * Frame->Interval, this);
                                            Effects.push_back(&tempVar53);
                                            break;
                                        case Monster::DemonGuard:
                                            Effect tempVar54(Libraries::Monsters[static_cast<unsigned short>(Monster::DemonGuard)], 288 + static_cast<int>(Direction) * 2, 2, 2 * Frame->Interval, this);
                                            Effects.push_back(&tempVar54);
                                            break;
                                        case Monster::TucsonMage:
                                            Effect tempVar55(Libraries::Monsters[static_cast<unsigned short>(Monster::TucsonMage)], 296 + static_cast<int>(Direction) * 10, 10, 10 * Frame->Interval, this);
                                            Effects.push_back(&tempVar55);
                                            break;
                                        case Monster::Armadillo:
                                            Effect tempVar56(Libraries::Monsters[static_cast<unsigned short>(Monster::Armadillo)], 496 + static_cast<int>(Direction) * 12, 12, 6 * Frame->Interval, this);
                                            Effects.push_back(&tempVar56);
                                            break;
                                        case Monster::CatWidow:
                                            Effect tempVar57(Libraries::Monsters[static_cast<unsigned short>(Monster::CatWidow)], 256 + static_cast<int>(Direction) * 3, 3, 3 * Frame->Interval, this);
                                            Effects.push_back(&tempVar57);
                                            break;
                                        case Monster::SnowWolf:
                                            Effect tempVar58(Libraries::Monsters[static_cast<unsigned short>(Monster::SnowWolf)], 328, 9, Frame->Count * Frame->Interval, this);
                                            Effects.push_back(&tempVar58);
                                            break;
                                        case Monster::BlackTortoise:
                                            Effect tempVar59(Libraries::Monsters[static_cast<unsigned short>(Monster::BlackTortoise)], 366 + static_cast<int>(Direction) * 4, 4, 4 * Frame->Interval, this);
                                            Effects.push_back(&tempVar59);
                                            break;
                                        case Monster::TreeQueen:
                                            Effect tempVar60(Libraries::Monsters[static_cast<unsigned short>(Monster::TreeQueen)], 66, 16, 16 * Frame->Interval, this);
                                            Effects.push_back(&tempVar60);
                                            break;
                                        case Monster::RhinoWarrior:
                                            Effect tempVar61(Libraries::Monsters[static_cast<unsigned short>(Monster::RhinoWarrior)], 376, 8, 800, front, CMain::Time);
                                            MapControl::Effects.push_back(&tempVar61);
                                            break;

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar51' statement was not added since tempVar51 was passed to a method or constructor. Handle memory management manually.
                                    }
                            }
                                break;
                            case 4:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::DemonWolf:
                                            Effect tempVar62(Libraries::Monsters[static_cast<unsigned short>(Monster::DemonWolf)], 312 + static_cast<int>(Direction) * 3, 3, 300, this);
                                            Effects.push_back(&tempVar62);
                                            break;
                                        case Monster::TucsonWarrior:
                                            Effect tempVar63(Libraries::Monsters[static_cast<unsigned short>(Monster::TucsonWarrior)], 344 + static_cast<int>(Direction) * 9, 9, 9 * Frame->Interval, this);
                                            Effects.push_back(&tempVar63);
                                            break;
                                        case Monster::PeacockSpider:
                                            Effect tempVar64(Libraries::Monsters[static_cast<unsigned short>(Monster::PeacockSpider)], 592 + static_cast<int>(Direction) * 9, 9, 9 * Frame->Interval, this);
                                            Effects.push_back(&tempVar64);
                                            break;
                                        case Monster::SackWarrior:
                                            Effect tempVar65(Libraries::Monsters[static_cast<unsigned short>(Monster::SackWarrior)], 368 + static_cast<int>(Direction) * 2, 2, 2 * Frame->Interval, this);
                                            Effects.push_back(&tempVar65);
                                            break;
                                        case Monster::ManTree:
                                            Effect tempVar66(Libraries::Monsters[static_cast<unsigned short>(Monster::ManTree)], 488 + static_cast<int>(Direction) * 2, 2, 2 * Frame->Interval, this);
                                            Effects.push_back(&tempVar66);
                                            break;
                                        case Monster::DarkWraith:
                                        {
                                            Effect tempVar67(Libraries::Monsters[static_cast<unsigned short>(Monster::DarkWraith)], 750 + static_cast<int>(Direction) * 5, 5, 500, this);
                                            Effects.push_back(&tempVar67);
                                            Effect *ef = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::DarkWraith)], 790, 6, 600, front, CMain::Time);
                                            MapControl::Effects.push_back(ef);
                                            break;

//C# TO C++ CONVERTER TODO TASK: A 'delete ef' statement was not added since ef was passed to a method or constructor. Handle memory management manually.
                                        }
                                    }
                                    break;
                            }
                            case 5:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::GeneralMeowMeow:
                                            Effect *tempVar68 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::GeneralMeowMeow)], 456 + static_cast<int>(Direction) * 7, 7, 7 * Frame->Interval, this);
                                            tempVar68->Blend = true;
                                            Effects.push_back(tempVar68);
                                            break;
                                        case Monster::TucsonGeneral:
                                            Effect tempVar69(Libraries::Monsters[static_cast<unsigned short>(Monster::TucsonGeneral)], 544, 8, 8 * Frame->Interval, this);
                                            Effects.push_back(&tempVar69);
                                            break;
                                        case Monster::FrozenMiner:
                                            Effect tempVar70(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenMiner)], 462 + static_cast<int>(Direction) * 5, 5, 500, this);
                                            Effects.push_back(&tempVar70);
                                            break;
                                        case Monster::IceCrystalSoldier:
                                        {
                                            Effect *ef = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::IceCrystalSoldier)], 470, 6, 600, front, CMain::Time);
                                            MapControl::Effects.push_back(ef);
                                            break;

//C# TO C++ CONVERTER TODO TASK: A 'delete ef' statement was not added since ef was passed to a method or constructor. Handle memory management manually.
                                        }
                                        case Monster::Bear:
                                        {
                                            Point *bleedEffectLocation = Functions::PointMove(CurrentLocation, Direction, 1);
                                            Effect *bleedEffect = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::Bear)], 312, 9, 900, bleedEffectLocation, CMain::Time);
                                            MapControl::Effects.push_back(bleedEffect);
                                            break;

//C# TO C++ CONVERTER TODO TASK: A 'delete bleedEffect' statement was not added since bleedEffect was passed to a method or constructor. Handle memory management manually.
                                        }

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar68' statement was not added since tempVar68 was passed to a method or constructor. Handle memory management manually.
                                    }
                                    break;

                            }
                            case 6:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::SeedingsGeneral:
                                            Effect tempVar71(Libraries::Monsters[static_cast<unsigned short>(Monster::SeedingsGeneral)], 1136 + static_cast<int>(Direction) * 6, 6, 600, this);
                                            Effects.push_back(&tempVar71);
                                            break;
                                        case Monster::OmaBlest:
                                            Effect tempVar72(Libraries::Monsters[static_cast<unsigned short>(Monster::OmaBlest)], 392 + static_cast<int>(Direction) * 5, 5, 500, this);
                                            Effects.push_back(&tempVar72);
                                            break;
                                        case Monster::WereTiger:
                                            Effect tempVar73(Libraries::Monsters[static_cast<unsigned short>(Monster::WereTiger)], 344 + static_cast<int>(Direction) * 6, 6, 600, this);
                                            Effects.push_back(&tempVar73);
                                            break;
                                        case Monster::Kirin:
                                        {
                                            Point *source2 = Functions::PointMove(CurrentLocation, Direction, 2);
                                            Effect *ef = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::Kirin)], 816, 8, 800, source2, CMain::Time);
                                            MapControl::Effects.push_back(ef);
                                            break;

//C# TO C++ CONVERTER TODO TASK: A 'delete ef' statement was not added since ef was passed to a method or constructor. Handle memory management manually.
                                        }
                                        case Monster::FrozenAxeman:
                                            Effect tempVar74(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenAxeman)], 558 + static_cast<int>(Direction) * 3, 3, 300, this);
                                            Effects.push_back(&tempVar74);
                                            break;
                                        case Monster::SnowYeti:
                                            Effect tempVar75(Libraries::Monsters[static_cast<unsigned short>(Monster::SnowYeti)], 536 + static_cast<int>(Direction) * 3, 3, 300, this);
                                            Effects.push_back(&tempVar75);
                                            break;
                                    }
                            }
                                break;
                            case 7:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::ElephantMan:
                                            Effect *tempVar76 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::ElephantMan)], 368, 9, 900, this);
                                            tempVar76->Blend = true;
                                            Effects.push_back(tempVar76);
                                            break;
                                        case Monster::ScalyBeast:
                                            Effect *tempVar77 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::ScalyBeast)], 368 + static_cast<int>(Direction) * 3, 3, 3 * Frame->Interval, this);
                                            tempVar77->Blend = false;
                                            Effects.push_back(tempVar77);
                                            break;

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar77' statement was not added since tempVar77 was passed to a method or constructor. Handle memory management manually.
//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar76' statement was not added since tempVar76 was passed to a method or constructor. Handle memory management manually.
                                    }
                            }
                                break;
                            case 8:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::StrayCat:
                                            Effect tempVar78(Libraries::Monsters[static_cast<unsigned short>(Monster::StrayCat)], 584 + static_cast<int>(Direction) * 6, 6, 6 * Frame->Interval, this);
                                            Effects.push_back(&tempVar78);
                                            break;
                                    }
                            }
                                break;
                            case 9:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::ScalyBeast:
                                            Effect *tempVar79 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::ScalyBeast)], 392, 3, 300, this);
                                            tempVar79->Blend = true;
                                            Effects.push_back(tempVar79);
                                            break;

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar79' statement was not added since tempVar79 was passed to a method or constructor. Handle memory management manually.
                                    }
                            }
                                break;
                            case 10:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::StoningStatue:
                                            Effect tempVar80(Libraries::Monsters[static_cast<unsigned short>(Monster::StoningStatue)], 642, 15, 15 * 100, this);
                                            Effects.push_back(&tempVar80);
                                            SoundManager::PlaySound(BaseSound + 7);
                                            break;
                                    }
                            }
                                break;
                            case 11:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::BlackHammerCat:
                                            Effect tempVar81(Libraries::Monsters[static_cast<unsigned short>(Monster::BlackHammerCat)], 736 + static_cast<int>(Direction) * 8, 8, 800, this);
                                            Effects.push_back(&tempVar81);
                                            break;
                                    }
                            }
                                break;
                            case 19:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::StoningStatue:
                                            Effect tempVar82(Libraries::Monsters[static_cast<unsigned short>(Monster::StoningStatue)], 624, 8, 8 * 100, this);
                                            Effects.push_back(&tempVar82);
                                            break;
                                    }
                            }
                                break;
                        }
                        if (FrameIndex == 3)
                        {
                            PlaySwingSound();
                        }
                        NextMotion += FrameInterval;
                    }
                }
                break;
            case MirAction::Attack3:
                if (CMain::Time >= NextMotion)
                {
                    GameScene::Scene->MapControl->TextureValid = false;

                    if (SkipFrames)
                    {
                        UpdateFrame();
                    }

                    if (UpdateFrame() >= Frame->Count)
                    {
                        FrameIndex = Frame->Count - 1;
                        SetAction();
                    }
                    else
                    {
                        switch (FrameIndex)
                        {
                            case 1:
                                switch (BaseImage)
                                {
                                    case Monster::OlympicFlame:
                                        if (TrackableEffect::GetOwnerEffectID(this->ObjectID, "CreatureFlame") < 0)
                                        {
                                            TrackableEffect tempVar83(new Effect(Libraries::Pets[(static_cast<unsigned short>(BaseImage)) - 10000], 280, 4, 800, this), "CreatureFlame");
                                            Effects.push_back(&tempVar83);
                                        }
                                        break;
                                    case Monster::GasToad:
                                        Effect tempVar84(Libraries::Monsters[static_cast<unsigned short>(Monster::GasToad)], 440, 9, 9 * Frame->Interval, this);
                                        Effects.push_back(&tempVar84);
                                        break;
                                }
                                break;
                            case 3:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::WingedTigerLord:
                                            Effect tempVar85(Libraries::Monsters[static_cast<unsigned short>(Monster::WingedTigerLord)], 632, 8, 600, this, 0, true);
                                            Effects.push_back(&tempVar85);
                                            break;
                                        case Monster::DarkWraith:
                                            Effect tempVar86(Libraries::Monsters[static_cast<unsigned short>(Monster::DarkWraith)], 796 + static_cast<int>(Direction) * 5, 5, 500, this);
                                            Effects.push_back(&tempVar86);
                                            break;
                                    }
                            }
                                break;
                            case 4:
                                switch (BaseImage)
                                {
                                    case Monster::OlympicFlame:
                                        if (TrackableEffect::GetOwnerEffectID(this->ObjectID, "CreatureSmoke") < 0)
                                        {
                                            TrackableEffect tempVar87(new Effect(Libraries::Pets[(static_cast<unsigned short>(BaseImage)) - 10000], 256, 3, 1000, this), "CreatureSmoke");
                                            Effects.push_back(&tempVar87);
                                        }
                                        break;
                                    case Monster::Kirin:
                                        Effect tempVar88(Libraries::Monsters[static_cast<unsigned short>(Monster::Kirin)], 824 + static_cast<int>(Direction) * 7, 7, 700, this);
                                        Effects.push_back(&tempVar88);
                                        break;
                                    case Monster::FrozenAxeman:
                                        Effect tempVar89(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenAxeman)], 588 + static_cast<int>(Direction) * 3, 3, 300, this);
                                        Effects.push_back(&tempVar89);
                                        break;
                                }
                                break;
                            case 5:
                                switch (BaseImage)
                                {
                                    case Monster::WhiteMammoth:
                                        Effect tempVar90(Libraries::Monsters[static_cast<unsigned short>(Monster::WhiteMammoth)], 376, 5, Frame->Count * Frame->Interval, this);
                                        Effects.push_back(&tempVar90);
                                        break;
                                }
                                break;
                            case 6:
                                switch (BaseImage)
                                {
                                    case Monster::RestlessJar:
                                        Effect tempVar91(Libraries::Monsters[static_cast<unsigned short>(Monster::RestlessJar)], 512, 7, 700, this);
                                        Effects.push_back(&tempVar91);
                                        break;
                                }
                                break;

                            case 10:
                                switch (BaseImage)
                                {
                                    case Monster::StrayCat:
                                        Effect tempVar92(Libraries::Monsters[static_cast<unsigned short>(Monster::StrayCat)], 728 + static_cast<int>(Direction) * 10, 10, 1000, this);
                                        Effects.push_back(&tempVar92);
                                        break;
                                }
                                break;
                        }
                        NextMotion += FrameInterval;
                    }
                }
                break;
            case MirAction::Attack4:
                if (CMain::Time >= NextMotion)
                {
                    GameScene::Scene->MapControl->TextureValid = false;

                    if (SkipFrames)
                    {
                        UpdateFrame();
                    }

                    if (UpdateFrame() >= Frame->Count)
                    {

                        FrameIndex = Frame->Count - 1;
                        SetAction();
                    }
                    else
                    {
                        NextMotion += FrameInterval;
                    }
                }
                break;
            case MirAction::AttackRange1:
                if (CMain::Time >= NextMotion)
                {
                    GameScene::Scene->MapControl->TextureValid = false;

                    if (SkipFrames)
                    {
                        UpdateFrame();
                    }

                    if (UpdateFrame() >= Frame->Count)
                    {
                        switch (BaseImage)
                        {
                            case Monster::DragonStatue:
                            {
                                MapObject *ob = MapControl::GetObject(TargetID);
                                if (ob != nullptr)
                                {
                                    Effect tempVar93(Libraries::Dragon, 350, 35, 1200, ob);
                                    ob->Effects.push_back(&tempVar93);
                                    SoundManager::PlaySound(BaseSound + 6);
                                }
                                break;
                            }
                        }
                        FrameIndex = Frame->Count - 1;
                        SetAction();
                    }
                    else
                    {
                        if (FrameIndex == 2)
                        {
                            PlaySwingSound();
                        }
                        MapObject *ob = nullptr;
                        Missile *missile;
                        switch (FrameIndex)
                        {
                            case 1:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::GuardianRock:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar94(Libraries::Magic2, 1410, 10, 400, ob);
                                                ob->Effects.push_back(&tempVar94);
                                                SoundManager::PlaySound(BaseSound + 6);
                                            }
                                            break;
                                        case Monster::OmaWitchDoctor:
                                            Effect tempVar95(Libraries::Monsters[static_cast<unsigned short>(Monster::OmaWitchDoctor)], 792 + static_cast<int>(Direction) * 7, 7, 7 * Frame->Interval, this);
                                            Effects.push_back(&tempVar95);
                                            break;
                                        case Monster::FloatingRock:
                                            Effect tempVar96(Libraries::Monsters[static_cast<unsigned short>(Monster::FloatingRock)], 159 + static_cast<int>(Direction) * 7, 7, 7 * Frame->Interval, this);
                                            Effects.push_back(&tempVar96);
                                            break;
                                    }
                                    break;
                            }
                            case 2:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::LeftGuard:
                                            Effect tempVar97(Libraries::Monsters[static_cast<unsigned short>(Monster::LeftGuard)], 336 + static_cast<int>(Direction) * 3, 3, 3 * Frame->Interval, this);
                                            Effects.push_back(&tempVar97);
                                            break;
                                        case Monster::ManectricClaw:
                                            Effect tempVar98(Libraries::Monsters[static_cast<unsigned short>(Monster::ManectricClaw)], 304 + static_cast<int>(Direction) * 10, 10, 10 * Frame->Interval, this);
                                            Effects.push_back(&tempVar98);
                                            break;
                                        case Monster::FlameSpear:
                                            Effect tempVar99(Libraries::Monsters[static_cast<unsigned short>(Monster::FlameSpear)], 544 + static_cast<int>(Direction) * 10, 10, 10 * 100, this);
                                            Effects.push_back(&tempVar99);
                                            break;
                                        case Monster::FrozenMagician:
                                            Effect tempVar100(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenMagician)], 512 + static_cast<int>(Direction) * 6, 6, 6 * Frame->Interval, this);
                                            Effects.push_back(&tempVar100);
                                            break;
                                    }
                                    break;
                            }
                            case 3:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::HornedArcher:
                                            Effect tempVar101(Libraries::Monsters[static_cast<unsigned short>(Monster::HornedArcher)], 336 + static_cast<int>(Direction) * 3, 3, 3 * Frame->Interval, this, 0, true);
                                            Effects.push_back(&tempVar101);
                                            break;
                                        case Monster::ColdArcher:
                                            Effect tempVar102(Libraries::Monsters[static_cast<unsigned short>(Monster::ColdArcher)], 336 + static_cast<int>(Direction) * 3, 3, 3 * Frame->Interval, this, 0, true);
                                            Effects.push_back(&tempVar102);
                                            break;
                                        case Monster::Jar2:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect *tempVar103 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::Jar2)], 624 + static_cast<int>(Direction) * 8, 8, 800, ob);
                                                tempVar103->Blend = true;
                                                ob->Effects.push_back(tempVar103);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar103' statement was not added since tempVar103 was passed to a method or constructor. Handle memory management manually.
                                            }
                                            break;
                                        case Monster::HardenRhino:
                                            Effect tempVar104(Libraries::Monsters[static_cast<unsigned short>(Monster::HardenRhino)], 392, 5, 5 * Frame->Interval, this);
                                            Effects.push_back(&tempVar104);
                                            break;
                                    }
                                    break;
                            }
                            case 4:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::AxeSkeleton:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                CreateProjectile(224, Libraries::Monsters[static_cast<unsigned short>(Monster::AxeSkeleton)], false, 3, 30, 0);
                                            }
                                            break;
                                        case Monster::Dark:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                CreateProjectile(224, Libraries::Monsters[static_cast<unsigned short>(Monster::Dark)], false, 3, 30, 0);
                                            }
                                            break;
                                        case Monster::ZumaArcher:
                                        case Monster::BoneArcher:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                CreateProjectile(224, Libraries::Monsters[static_cast<unsigned short>(Monster::ZumaArcher)], false, 1, 30, 0);
                                                SoundManager::PlaySound(BaseSound + 6);
                                            }
                                            break;
                                        case Monster::RedThunderZuma:
                                        case Monster::FrozenRedZuma:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar105(Libraries::Dragon, 400 + CMain::Random->Next(3) * 10, 5, 300, ob);
                                                ob->Effects.push_back(&tempVar105);
                                                SoundManager::PlaySound(BaseSound + 6);
                                            }
                                            break;
                                        case Monster::BoneLord:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                CreateProjectile(784, Libraries::Monsters[static_cast<unsigned short>(Monster::BoneLord)], true, 6, 30, 0, 6, false, std::nullopt, 0);
                                            }
                                            break;
                                        case Monster::RightGuard:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar106(Libraries::Magic2, 10, 5, 300, ob);
                                                ob->Effects.push_back(&tempVar106);
                                            }
                                            break;
                                        case Monster::LeftGuard:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                CreateProjectile(10, Libraries::Magic, true, 6, 30, 4);
                                            }
                                            break;
                                        case Monster::MinotaurKing:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar107(Libraries::Monsters[static_cast<unsigned short>(Monster::MinotaurKing)], 320, 20, 1000, ob);
                                                ob->Effects.push_back(&tempVar107);
                                            }
                                            break;
                                        case Monster::FrostTiger:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                CreateProjectile(410, Libraries::Magic2, true, 4, 30, 6);
                                            }
                                            break;
                                        case Monster::Yimoogi:
                                        case Monster::RedYimoogi:
                                        case Monster::Snake10:
                                        case Monster::Snake11:
                                        case Monster::Snake12:
                                        case Monster::Snake13:
                                        case Monster::Snake14:
                                        case Monster::Snake15:
                                        case Monster::Snake16:
                                        case Monster::Snake17:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar108(Libraries::Magic2, 1250, 15, 1000, ob);
                                                ob->Effects.push_back(&tempVar108);
                                                SoundManager::PlaySound(BaseSound + 6);
                                            }
                                            break;
                                        case Monster::HolyDeva:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar109(Libraries::Magic2, 10, 5, 300, ob);
                                                ob->Effects.push_back(&tempVar109);
                                                SoundManager::PlaySound(BaseSound + 6);
                                            }
                                            break;
                                        case Monster::CrossbowOma:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                CreateProjectile(38, Libraries::Monsters[static_cast<unsigned short>(Monster::CrossbowOma)], false, 1, 30, 6);
                                            }
                                            break;
                                        case Monster::DarkCrossbowOma:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                CreateProjectile(38, Libraries::Monsters[static_cast<unsigned short>(Monster::DarkCrossbowOma)], false, 1, 30, 6);
                                            }
                                            break;
                                        case Monster::WingedOma:
                                        case Monster::DarkWingedOma:
                                            missile = CreateProjectile(224, Libraries::Monsters[static_cast<unsigned short>(Monster::WingedOma)], false, 6, 30, 0, 6, false, std::nullopt, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect *tempVar110 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::WingedOma)], 272, 2, 150, missile->Target);
                                                    tempVar110->Blend = false;
                                                    missile->Target->Effects.push_back(tempVar110);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar110' statement was not added since tempVar110 was passed to a method or constructor. Handle memory management manually.
                                                });
                                            }
                                            break;
                                        case Monster::PoisonHugger:
                                            missile = CreateProjectile(208, Libraries::Monsters[static_cast<unsigned short>(Monster::PoisonHugger)], true, 1, 30, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect *tempVar111 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::PoisonHugger)], 224, 5, 150, missile->Target);
                                                    tempVar111->Blend = true;
                                                    missile->Target->Effects.push_back(tempVar111);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar111' statement was not added since tempVar111 was passed to a method or constructor. Handle memory management manually.
                                                });
                                            }
                                            break;
                                        case Monster::RedFoxman:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar112(Libraries::Monsters[static_cast<unsigned short>(Monster::RedFoxman)], 224, 9, 300, ob);
                                                ob->Effects.push_back(&tempVar112);
                                                SoundManager::PlaySound(BaseSound + 6);
                                            }
                                            break;
                                        case Monster::WhiteFoxman:
                                            missile = CreateProjectile(1160, Libraries::Magic, true, 3, 30, 7);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect tempVar113(Libraries::Monsters[static_cast<unsigned short>(Monster::WhiteFoxman)], 352, 10, 600, missile->Target);
                                                    missile->Target->Effects.push_back(&tempVar113);
                                                    SoundManager::PlaySound(BaseSound + 6);
                                                });
                                            }
                                            break;
                                        case Monster::TrapRock:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar114(Libraries::Monsters[static_cast<unsigned short>(Monster::TrapRock)], 26, 10, 600, ob);
                                                ob->Effects.push_back(&tempVar114);
                                                SoundManager::PlaySound(BaseSound + 6);
                                            }
                                            break;
                                        case Monster::HedgeKekTal:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                CreateProjectile(38, Libraries::Monsters[static_cast<unsigned short>(Monster::HedgeKekTal)], false, 4, 30, 6);
                                            }
                                            break;
                                        case Monster::BigHedgeKekTal:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                CreateProjectile(38, Libraries::Monsters[static_cast<unsigned short>(Monster::BigHedgeKekTal)], false, 4, 30, 6);
                                            }
                                            break;
                                        case Monster::EvilMir:
                                            missile = CreateProjectile(60, Libraries::Dragon, true, 10, 10, 0);

                                            if (missile->Direction > 12)
                                            {
                                                missile->Direction = 12;
                                            }
                                            if (missile->Direction < 7)
                                            {
                                                missile->Direction = 7;
                                            }

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect tempVar115(Libraries::Dragon, 200, 20, 600, missile->Target);
                                                    missile->Target->Effects.push_back(&tempVar115);
                                                });
                                            }
                                            break;
                                        case Monster::ArcherGuard:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                CreateProjectile(38, Libraries::Monsters[static_cast<unsigned short>(Monster::ArcherGuard)], false, 3, 30, 6);
                                            }
                                            break;
                                        case Monster::SpittingToad:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                CreateProjectile(280, Libraries::Monsters[static_cast<unsigned short>(Monster::SpittingToad)], true, 6, 30, 0);
                                            }
                                            break;
                                        case Monster::ArcherGuard2:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                CreateProjectile(38, Libraries::Monsters[static_cast<unsigned short>(Monster::ArcherGuard)], false, 3, 30, 6);
                                            }
                                            break;
                                        case Monster::FinialTurtle:
                                            missile = CreateProjectile(272, Libraries::Monsters[static_cast<unsigned short>(Monster::FinialTurtle)], true, 3, 30, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect *tempVar116 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::FinialTurtle)], 320, 10, 500, missile->Target);
                                                    tempVar116->Blend = true;
                                                    missile->Target->Effects.push_back(tempVar116);
                                                    SoundManager::PlaySound(20000 + static_cast<unsigned short>(Spell::FrostCrunch) * 10 + 2);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar116' statement was not added since tempVar116 was passed to a method or constructor. Handle memory management manually.
                                                });
                                            }
                                            break;
                                        case Monster::HellBolt:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar117(Libraries::Monsters[static_cast<unsigned short>(Monster::HellBolt)], 315, 10, 600, ob);
                                                ob->Effects.push_back(&tempVar117);
                                                SoundManager::PlaySound(BaseSound + 6);
                                            }
                                            break;
                                        case Monster::WitchDoctor:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                missile = CreateProjectile(313, Libraries::Monsters[static_cast<unsigned short>(Monster::WitchDoctor)], true, 5, 30, -5, 6, false, std::nullopt, 0);

                                                if (missile->Target != nullptr)
                                                {
                                                    missile->Complete->addListener([&] (o, e)
                                                    {
                                                        if (missile->Target->CurrentAction == MirAction::Dead)
                                                        {
                                                            return;
                                                        }
                                                        Effect tempVar118(Libraries::Monsters[static_cast<unsigned short>(Monster::WitchDoctor)], 318, 10, 600, missile->Target);
                                                        missile->Target->Effects.push_back(&tempVar118);
                                                        SoundManager::PlaySound(BaseSound + 6);
                                                    });
                                                }
                                            }
                                            break;
                                        case Monster::WingedTigerLord:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar119(Libraries::Monsters[static_cast<unsigned short>(Monster::WingedTigerLord)], 640, 10, 800, ob, CMain::Time + 400, false);
                                                ob->Effects.push_back(&tempVar119);
                                            }
                                            break;
                                        case Monster::TrollBomber:
                                            missile = CreateProjectile(208, Libraries::Monsters[static_cast<unsigned short>(Monster::TrollBomber)], false, 4, 40, -4, 6, false, std::nullopt, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    SoundManager::PlaySound(BaseSound + 9);
                                                    Effect *tempVar120 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::TrollBomber)], 212, 6, 600, missile->Target);
                                                    tempVar120->Blend = true;
                                                    missile->Target->Effects.push_back(tempVar120);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar120' statement was not added since tempVar120 was passed to a method or constructor. Handle memory management manually.
                                                });
                                            }
                                            break;
                                        case Monster::TrollStoner:
                                            SoundManager::PlaySound(BaseSound + 9);
                                            missile = CreateProjectile(208, Libraries::Monsters[static_cast<unsigned short>(Monster::TrollStoner)], false, 4, 40, -4, 6, false, std::nullopt, 0);
                                            break;
                                        case Monster::FlameMage:
                                            missile = CreateProjectile(544, Libraries::Monsters[static_cast<unsigned short>(Monster::FlameMage)], true, 3, 20, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    Effect tempVar121(Libraries::Monsters[static_cast<unsigned short>(Monster::FlameMage)], 592, 10, 1000, missile->Target);
                                                    missile->Target->Effects.push_back(&tempVar121);
                                                });
                                            }
                                            break;
                                        case Monster::FlameScythe:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar122(Libraries::Monsters[static_cast<unsigned short>(Monster::FlameScythe)], 586, 9, 900, ob);
                                                ob->Effects.push_back(&tempVar122);
                                            }
                                            break;
                                        case Monster::FlameAssassin:
                                            missile = CreateProjectile(592, Libraries::Monsters[static_cast<unsigned short>(Monster::FlameAssassin)], true, 3, 20, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    Effect tempVar123(Libraries::Monsters[static_cast<unsigned short>(Monster::FlameAssassin)], 640, 6, 600, missile->Target);
                                                    missile->Target->Effects.push_back(&tempVar123);
                                                });
                                            }
                                            break;
                                        case Monster::FlameQueen:
                                            Effect tempVar124(Libraries::Monsters[static_cast<unsigned short>(Monster::FlameQueen)], 729, 10, Frame->Count * Frame->Interval, this);
                                            Effects.push_back(&tempVar124);
                                            break;
                                        case Monster::AncientBringer:
                                            missile = CreateProjectile(688, Libraries::Monsters[static_cast<unsigned short>(Monster::AncientBringer)], true, 4, 50, 0, 6, false, std::nullopt, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect *tempVar125 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::AncientBringer)], 720, 10, 1000, missile->Target);
                                                    tempVar125->Blend = true;
                                                    missile->Target->Effects.push_back(tempVar125);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar125' statement was not added since tempVar125 was passed to a method or constructor. Handle memory management manually.
                                                });
                                            }
                                            break;
                                        case Monster::RestlessJar:
                                            missile = CreateProjectile(476, Libraries::Monsters[static_cast<unsigned short>(Monster::RestlessJar)], true, 2, 100, 0, 6, true, std::nullopt, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect *tempVar126 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::RestlessJar)], 508, 3, 300, missile->Target);
                                                    tempVar126->Blend = true;
                                                    missile->Target->Effects.push_back(tempVar126);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar126' statement was not added since tempVar126 was passed to a method or constructor. Handle memory management manually.
                                                });
                                            }
                                            break;
                                        case Monster::IceGuard:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect *tempVar127 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::IceGuard)], 262, 6, 600, ob);
                                                tempVar127->Blend = true;
                                                ob->Effects.push_back(tempVar127);
                                                SoundManager::PlaySound(BaseSound + 6);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar127' statement was not added since tempVar127 was passed to a method or constructor. Handle memory management manually.
                                            }
                                            break;
                                        case Monster::ElementGuard:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect *tempVar128 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::ElementGuard)], 360 + static_cast<int>(ob->Direction) * 7, 7, 7 * Frame->Interval, ob);
                                                tempVar128->Blend = true;
                                                ob->Effects.push_back(tempVar128);
                                                SoundManager::PlaySound(BaseSound + 6);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar128' statement was not added since tempVar128 was passed to a method or constructor. Handle memory management manually.
                                            }
                                            break;
                                        case Monster::KingGuard:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect *tempVar129 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::KingGuard)], 746, 7, 700, ob);
                                                tempVar129->Blend = true;
                                                ob->Effects.push_back(tempVar129);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar129' statement was not added since tempVar129 was passed to a method or constructor. Handle memory management manually.
                                            }
                                            break;
                                        case Monster::BurningZombie:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar130(Libraries::Monsters[static_cast<unsigned short>(Monster::BurningZombie)], 361, 12, 1000, ob);
                                                ob->Effects.push_back(&tempVar130);
                                            }
                                            break;
                                        case Monster::FrozenZombie:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar131(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenZombie)], 352, 8, 1000, ob);
                                                ob->Effects.push_back(&tempVar131);
                                            }
                                            break;
                                        case Monster::CatShaman:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect *tempVar132 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::CatShaman)], 720, 12, 1500, ob);
                                                tempVar132->Blend = false;
                                                ob->Effects.push_back(tempVar132);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar132' statement was not added since tempVar132 was passed to a method or constructor. Handle memory management manually.
                                            }
                                            break;
                                        case Monster::SeedingsGeneral:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect *tempVar133 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::SeedingsGeneral)], 1256, 9, 900, ob);
                                                tempVar133->Blend = true;
                                                ob->Effects.push_back(tempVar133);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar133' statement was not added since tempVar133 was passed to a method or constructor. Handle memory management manually.
                                            }
                                            break;
                                        case Monster::GeneralMeowMeow:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect *tempVar134 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::GeneralMeowMeow)], 512, 10, 1000, ob);
                                                tempVar134->Blend = true;
                                                ob->Effects.push_back(tempVar134);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar134' statement was not added since tempVar134 was passed to a method or constructor. Handle memory management manually.
                                            }
                                            break;
                                        case Monster::CannibalTentacles:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                CreateProjectile(472, Libraries::Monsters[static_cast<unsigned short>(Monster::CannibalTentacles)], true, 8, 100, 0, 6, false, std::nullopt, 0);
                                            }
                                            break;
                                        case Monster::SwampWarrior:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect *tempVar135 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::SwampWarrior)], 392, 8, 800, ob);
                                                tempVar135->Blend = true;
                                                ob->Effects.push_back(tempVar135);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar135' statement was not added since tempVar135 was passed to a method or constructor. Handle memory management manually.
                                            }
                                            break;
                                        case Monster::PeacockSpider:
                                            missile = CreateProjectile(664, Libraries::Monsters[static_cast<unsigned short>(Monster::PeacockSpider)], true, 5, 100, 0, 6, true, std::nullopt, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect *tempVar136 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::PeacockSpider)], 744, 11, 1100, missile->Target);
                                                    tempVar136->Blend = true;
                                                    missile->Target->Effects.push_back(tempVar136);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar136' statement was not added since tempVar136 was passed to a method or constructor. Handle memory management manually.
                                                });
                                            }
                                            break;
                                        case Monster::RhinoPriest:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar137(Libraries::Monsters[static_cast<unsigned short>(Monster::RhinoPriest)], 376, 9, 900, ob);
                                                ob->Effects.push_back(&tempVar137);
                                            }
                                            break;
                                        case Monster::TreeGuardian:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar138(Libraries::Monsters[static_cast<unsigned short>(Monster::TreeGuardian)], 544, 8, 800, ob);
                                                ob->Effects.push_back(&tempVar138);
                                            }
                                            break;
                                        case Monster::CreeperPlant:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect *tempVar139 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::CreeperPlant)], 250, 6, 600, ob->CurrentLocation, CMain::Time);
                                                tempVar139->Blend = true;
                                                MapControl::Effects.push_back(tempVar139);
                                                Effect *tempVar140 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::CreeperPlant)], 256, 10, 1000, ob->CurrentLocation, CMain::Time);
                                                tempVar140->Blend = false;
                                                MapControl::Effects.push_back(tempVar140);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar140' statement was not added since tempVar140 was passed to a method or constructor. Handle memory management manually.
//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar139' statement was not added since tempVar139 was passed to a method or constructor. Handle memory management manually.
                                            }
                                            break;
                                        case Monster::FloatingWraith:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                CreateProjectile(248, Libraries::Monsters[static_cast<unsigned short>(Monster::FloatingWraith)], true, 2, 20, 0, 6, true, std::nullopt, 0);
                                            }
                                            break;
                                        case Monster::AvengingSpirit:
                                            missile = CreateProjectile(368, Libraries::Monsters[static_cast<unsigned short>(Monster::AvengingSpirit)], true, 4, 40, 0, 6, true, std::nullopt, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect *tempVar141 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::AvengingSpirit)], 432, 10, 1000, missile->Target);
                                                    tempVar141->Blend = true;
                                                    missile->Target->Effects.push_back(tempVar141);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar141' statement was not added since tempVar141 was passed to a method or constructor. Handle memory management manually.
                                                });
                                            }
                                            break;
                                        case Monster::AvengingWarrior:
                                            missile = CreateProjectile(312, Libraries::Monsters[static_cast<unsigned short>(Monster::AvengingWarrior)], true, 5, 50, 0, 6, true, std::nullopt, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect *tempVar142 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::AvengingWarrior)], 392, 7, 700, missile->Target);
                                                    tempVar142->Blend = true;
                                                    missile->Target->Effects.push_back(tempVar142);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar142' statement was not added since tempVar142 was passed to a method or constructor. Handle memory management manually.
                                                });
                                            }
                                            break;
                                        case Monster::ManTree:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar143(Libraries::Monsters[static_cast<unsigned short>(Monster::ManTree)], 520, 8, 1000, ob);
                                                ob->Effects.push_back(&tempVar143);
                                            }
                                            break;
                                        case Monster::FrozenArcher:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                CreateProjectile(264, Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenArcher)], true, 5, 80, 0);
                                            }
                                            break;
                                        case Monster::BlackTortoise:
                                        {
                                            Point *source = Functions::PointMove(CurrentLocation, Direction, 2);

                                            missile = CreateProjectile(444, Libraries::Monsters[static_cast<unsigned short>(Monster::BlackTortoise)], true, 6, 60, 0, 6, true, std::nullopt, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect tempVar144(Libraries::Monsters[static_cast<unsigned short>(Monster::BlackTortoise)], 540, 6, 600, missile->Target);
                                                    missile->Target->Effects.push_back(&tempVar144);
                                                });
                                            }
                                            break;
                                        }
                                        case Monster::DragonArcher:
                                            if (MapControl::GetObject(TargetID) != nullptr)
                                            {
                                                CreateProjectile(416, Libraries::Monsters[static_cast<unsigned short>(Monster::DragonArcher)], true, 5, 50, 0);
                                            }
                                            break;
                                        case Monster::HornedMage:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect *tempVar145 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::HornedMage)], 768, 9, 800, ob);
                                                tempVar145->Blend = false;
                                                ob->Effects.push_back(tempVar145);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar145' statement was not added since tempVar145 was passed to a method or constructor. Handle memory management manually.
                                            }
                                            break;
                                        case Monster::ColdArcher:
                                            Effect tempVar146(Libraries::Monsters[static_cast<unsigned short>(Monster::ColdArcher)], 336 + 4 * static_cast<int>(Direction), 4, 4 * Frame->Interval, this);
                                            Effects.push_back(&tempVar146);
                                            missile = CreateProjectile(368, Libraries::Monsters[static_cast<unsigned short>(Monster::ColdArcher)], true, 2, 100, 0);
                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect *tempVar147 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::ColdArcher)], 384, 10, 1000, missile->Target);
                                                    tempVar147->Blend = true;
                                                    missile->Target->Effects.push_back(tempVar147);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar147' statement was not added since tempVar147 was passed to a method or constructor. Handle memory management manually.
                                                });
                                            }
                                            break;
                                        case Monster::HornedArcher:
                                            missile = CreateProjectile(360, Libraries::Monsters[static_cast<unsigned short>(Monster::HornedArcher)], true, 3, 50, 0, 6, true, std::nullopt, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect *tempVar148 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::HornedArcher)], 408, 6, 500, missile->Target);
                                                    tempVar148->Blend = true;
                                                    missile->Target->Effects.push_back(tempVar148);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar148' statement was not added since tempVar148 was passed to a method or constructor. Handle memory management manually.
                                                });
                                            }
                                            break;
                                            //END OF CASE 4.
                                    }
                                    break;
                            }
                            case 5:
                                switch (BaseImage)
                                {
                                    case Monster::OmaCannibal:
                                        missile = CreateProjectile(360, Libraries::Monsters[static_cast<unsigned short>(Monster::OmaCannibal)], true, 6, 60, 0);

                                        if (missile->Target != nullptr)
                                        {
                                            missile->Complete->addListener([&] (o, e)
                                            {
                                                if (missile->Target->CurrentAction == MirAction::Dead)
                                                {
                                                    return;
                                                }
                                                Effect *tempVar149 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::OmaCannibal)], 456, 7, 700, missile->Target);
                                                tempVar149->Blend = true;
                                                missile->Target->Effects.push_back(tempVar149);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar149' statement was not added since tempVar149 was passed to a method or constructor. Handle memory management manually.
                                            });
                                        }
                                        break;
                                    case Monster::OmaMage:
                                        missile = CreateProjectile(392, Libraries::Monsters[static_cast<unsigned short>(Monster::OmaMage)], true, 8, 80, 0, 6, true, std::nullopt, 0);

                                        if (missile->Target != nullptr)
                                        {
                                            missile->Complete->addListener([&] (o, e)
                                            {
                                                if (missile->Target->CurrentAction == MirAction::Dead)
                                                {
                                                    return;
                                                }
                                                Effect *tempVar150 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::OmaMage)], 520, 9, 600, missile->Target);
                                                tempVar150->Blend = true;
                                                missile->Target->Effects.push_back(tempVar150);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar150' statement was not added since tempVar150 was passed to a method or constructor. Handle memory management manually.
                                            });
                                        }
                                        break;
                                    case Monster::SnowYeti:
                                        missile = CreateProjectile(560, Libraries::Monsters[static_cast<unsigned short>(Monster::SnowYeti)], true, 6, 20, 0);
                                        break;
                                    case Monster::MudZombie:
                                        ob = MapControl::GetObject(TargetID);
                                        if (ob != nullptr)
                                        {
                                            Effect *tempVar151 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::MudZombie)], 304, 7, 700, ob);
                                            tempVar151->Blend = false;
                                            ob->Effects.push_back(tempVar151);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar151' statement was not added since tempVar151 was passed to a method or constructor. Handle memory management manually.
                                        }
                                        break;
                                }

                                break;
                            case 6:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::HornedMage:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar152(Libraries::Monsters[static_cast<unsigned short>(Monster::HornedMage)], 777, 6, 800, ob);
                                                ob->Effects.push_back(&tempVar152);
                                            }
                                            break;
                                        case Monster::FrozenMagician:
                                            missile = CreateProjectile(560, Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenMagician)], true, 6, 30, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    Effect tempVar153(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenMagician)], 656, 6, 600, missile->Target);
                                                    missile->Target->Effects.push_back(&tempVar153);
                                                });
                                            }
                                            break;
                                        case Monster::IceCrystalSoldier:
                                        {
                                            Point *source = Functions::PointMove(CurrentLocation, Direction, 1);
                                            Effect *ef = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::IceCrystalSoldier)], 476, 8, 800, source, CMain::Time);
                                            MapControl::Effects.push_back(ef);
                                            break;

//C# TO C++ CONVERTER TODO TASK: A 'delete ef' statement was not added since ef was passed to a method or constructor. Handle memory management manually.
                                        }
                                        case Monster::DarkSpirit:
                                            missile = CreateProjectile(512, Libraries::Monsters[static_cast<unsigned short>(Monster::DarkSpirit)], false, 6, 20, 0);
                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect tempVar154(Libraries::Monsters[static_cast<unsigned short>(Monster::DarkSpirit)], 608, 10, 1000, missile->Target, 0, false);
                                                    missile->Target->Effects.push_back(&tempVar154);
                                                });
                                            }
                                            break;
                                    }
                                    break;
                            }
                            case 7:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::FrozenKnight:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar155(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenKnight)], 456, 10, 1000, ob);
                                                ob->Effects.push_back(&tempVar155);
                                            }
                                            break;
                                        case Monster::IcePhantom:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect *tempVar156 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::IcePhantom)], 682, 10, 1000, ob);
                                                tempVar156->Blend = true;
                                                ob->Effects.push_back(tempVar156);
                                                SoundManager::PlaySound(BaseSound + 6); //is this the correct sound for this mob attack?

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar156' statement was not added since tempVar156 was passed to a method or constructor. Handle memory management manually.
                                            }
                                            break;
                                        case Monster::FloatingRock:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar157(Libraries::Monsters[static_cast<unsigned short>(Monster::FloatingRock)], 226, 10, 1000, ob);
                                                ob->Effects.push_back(&tempVar157);
                                                SoundManager::PlaySound(BaseSound + 6);
                                            }
                                            break;
                                    }
                                    break;
                            }
                        }
                        NextMotion += FrameInterval;
                    }
                }
                break;
            case MirAction::AttackRange2:
                if (CMain::Time >= NextMotion)
                {
                    GameScene::Scene->MapControl->TextureValid = false;

                    if (SkipFrames)
                    {
                        UpdateFrame();
                    }

                    if (UpdateFrame() >= Frame->Count)
                    {
                        FrameIndex = Frame->Count - 1;
                        SetAction();
                    }
                    else
                    {
                        MapObject *ob = nullptr;
                        Missile *missile;
                        switch (FrameIndex)
                        {
                            case 1:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::RestlessJar:
                                        {
                                            auto point = Functions::PointMove(CurrentLocation, Direction, 2);
                                            Effect tempVar158(Libraries::Monsters[static_cast<unsigned short>(Monster::RestlessJar)], 391 + static_cast<int>(Direction) * 10, 10, 10 * Frame->Interval, point);
                                            MapControl::Effects.push_back(&tempVar158);
                                            break;
                                        }
                                    }
                                    break;
                            }
                            case 2:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::FrozenMagician:
                                            Effect tempVar159(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenMagician)], 662 + static_cast<int>(Direction) * 9, 9, 9 * Frame->Interval, this);
                                            Effects.push_back(&tempVar159);
                                            break;

                                    }
                                    break;
                            }
                            case 4:
                            {
                                    switch (BaseImage)
                                    {

                                        case Monster::RedFoxman:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar160(Libraries::Monsters[static_cast<unsigned short>(Monster::RedFoxman)], 233, 10, 400, ob);
                                                ob->Effects.push_back(&tempVar160);
                                                SoundManager::PlaySound(BaseSound + 7);
                                            }
                                            break;
                                        case Monster::WhiteFoxman:
                                            missile = CreateProjectile(1160, Libraries::Magic, true, 3, 30, 7);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect tempVar161(Libraries::Monsters[static_cast<unsigned short>(Monster::WhiteFoxman)], 362, 15, 1800, missile->Target);
                                                    missile->Target->Effects.push_back(&tempVar161);
                                                    SoundManager::PlaySound(BaseSound + 7);
                                                });
                                            }
                                            break;
                                        case Monster::TrollKing:
                                            missile = CreateProjectile(294, Libraries::Monsters[static_cast<unsigned short>(Monster::TrollKing)], false, 4, 40, -4, 6, false, std::nullopt, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    SoundManager::PlaySound(BaseSound + 9);
                                                    Effect *tempVar162 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::TrollKing)], 298, 6, 600, missile->Target);
                                                    tempVar162->Blend = true;
                                                    missile->Target->Effects.push_back(tempVar162);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar162' statement was not added since tempVar162 was passed to a method or constructor. Handle memory management manually.
                                                });
                                            }
                                            break;
                                        case Monster::AncientBringer:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar163(Libraries::Monsters[static_cast<unsigned short>(Monster::AncientBringer)], 740, 14, 2000, ob);
                                                ob->Effects.push_back(&tempVar163);
                                                SoundManager::PlaySound(BaseSound + 6);
                                            }
                                            break;
                                        case Monster::IceGuard:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect *tempVar164 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::IceGuard)], 268, 5, 500, ob);
                                                tempVar164->Blend = true;
                                                ob->Effects.push_back(tempVar164);
                                                SoundManager::PlaySound(BaseSound + 6);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar164' statement was not added since tempVar164 was passed to a method or constructor. Handle memory management manually.
                                            }
                                            break;
                                        case Monster::CatShaman:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar165(Libraries::Monsters[static_cast<unsigned short>(Monster::CatShaman)], 732, 6, 500, ob);
                                                ob->Effects.push_back(&tempVar165);
                                                SoundManager::PlaySound(BaseSound + 6);
                                            }
                                            break;
                                        case Monster::SeedingsGeneral:
                                            missile = CreateProjectile(1265, Libraries::Monsters[static_cast<unsigned short>(Monster::SeedingsGeneral)], true, 4, 50, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect *tempVar166 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::SeedingsGeneral)], 1329, 8, 500, missile->Target);
                                                    tempVar166->Blend = true;
                                                    missile->Target->Effects.push_back(tempVar166);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar166' statement was not added since tempVar166 was passed to a method or constructor. Handle memory management manually.
                                                });
                                            }
                                            break;
                                        case Monster::TucsonGeneral:
                                            missile = CreateProjectile(592, Libraries::Monsters[static_cast<unsigned short>(Monster::TucsonGeneral)], true, 9, 30, 0, 6, true, std::nullopt, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect *tempVar167 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::TucsonGeneral)], 736, 9, 900, missile->Target);
                                                    tempVar167->Blend = true;
                                                    missile->Target->Effects.push_back(tempVar167);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar167' statement was not added since tempVar167 was passed to a method or constructor. Handle memory management manually.
                                                });
                                            }
                                            break;
                                        case Monster::RhinoPriest:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect *tempVar168 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::RhinoPriest)], 448, 7, 700, ob);
                                                tempVar168->Blend = true;
                                                ob->Effects.push_back(tempVar168);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar168' statement was not added since tempVar168 was passed to a method or constructor. Handle memory management manually.
                                            }
                                            break;
                                        case Monster::TreeGuardian:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect tempVar169(Libraries::Monsters[static_cast<unsigned short>(Monster::TreeGuardian)], 648 + (static_cast<int>(Direction) * 10), 10, 1000, ob->CurrentLocation);
                                                MapControl::Effects.push_back(&tempVar169);
                                            }
                                            break;
                                        case Monster::OmaWitchDoctor:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect *tempVar170 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::OmaWitchDoctor)], 848, 11, 1100, ob);
                                                tempVar170->Blend = true;
                                                ob->Effects.push_back(tempVar170);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar170' statement was not added since tempVar170 was passed to a method or constructor. Handle memory management manually.
                                            }
                                            break;
                                        case Monster::IcePhantom:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect *tempVar171 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::IcePhantom)], 772, 7, 700, ob);
                                                tempVar171->Blend = true;
                                                ob->Effects.push_back(tempVar171);
                                                SoundManager::PlaySound(BaseSound + 6); //is this the correct sound for this mob attack?

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar171' statement was not added since tempVar171 was passed to a method or constructor. Handle memory management manually.
                                            }
                                            break;
                                        case Monster::ColdArcher:
                                            missile = CreateProjectile(394, Libraries::Monsters[static_cast<unsigned short>(Monster::ColdArcher)], true, 3, 50, 0, 6, true, std::nullopt, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect *tempVar172 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::ColdArcher)], 442, 6, 500, missile->Target);
                                                    tempVar172->Blend = true;
                                                    missile->Target->Effects.push_back(tempVar172);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar172' statement was not added since tempVar172 was passed to a method or constructor. Handle memory management manually.
                                                });
                                            }
                                            break;
                                        case Monster::HornedArcher:
                                            missile = CreateProjectile(414, Libraries::Monsters[static_cast<unsigned short>(Monster::HornedArcher)], true, 3, 50, 0, 6, true, std::nullopt, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    if (missile->Target->CurrentAction == MirAction::Dead)
                                                    {
                                                        return;
                                                    }
                                                    Effect *tempVar173 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::HornedArcher)], 462, 6, 500, missile->Target);
                                                    tempVar173->Blend = true;
                                                    missile->Target->Effects.push_back(tempVar173);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar173' statement was not added since tempVar173 was passed to a method or constructor. Handle memory management manually.
                                                });
                                            }
                                            break;
                                    }
                                    break;
                            }
                            case 8:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::FrozenMagician:
                                            missile = CreateProjectile(734, Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenMagician)], true, 6, 30, 0);

                                            if (missile->Target != nullptr)
                                            {
                                                missile->Complete->addListener([&] (o, e)
                                                {
                                                    Effect tempVar174(Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenMagician)], 830, 10, 1000, missile->Target);
                                                    missile->Target->Effects.push_back(&tempVar174);
                                                });
                                            }
                                            break;
                                    }
                                    break;

                            }
                        }
                        NextMotion += FrameInterval;
                    }
                }
                break;
            case MirAction::AttackRange3:
                if (CMain::Time >= NextMotion)
                {
                    GameScene::Scene->MapControl->TextureValid = false;

                    if (SkipFrames)
                    {
                        UpdateFrame();
                    }

                    if (UpdateFrame() >= Frame->Count)
                    {
                        FrameIndex = Frame->Count - 1;
                        SetAction();
                    }
                    else
                    {
                        MapObject *ob = nullptr;
                        Missile *missile;
                        switch (FrameIndex)
                        {
                            case 4:
                            {
                                    switch (BaseImage)
                                    {
                                        case Monster::TucsonGeneral:
                                            ob = MapControl::GetObject(TargetID);
                                            if (ob != nullptr)
                                            {
                                                Effect *tempVar175 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::TucsonGeneral)], 745, 17, 1000, ob);
                                                tempVar175->Blend = true;
                                                ob->Effects.push_back(tempVar175);

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar175' statement was not added since tempVar175 was passed to a method or constructor. Handle memory management manually.
                                            }
                                            break;
                                    }
                            }
                                break;
                        }
                        NextMotion += FrameInterval;
                    }
                }
                break;
            case MirAction::Struck:
                if (CMain::Time >= NextMotion)
                {
                    GameScene::Scene->MapControl->TextureValid = false;

                    if (SkipFrames)
                    {
                        UpdateFrame();
                    }

                    if (UpdateFrame() >= Frame->Count)
                    {
                        FrameIndex = Frame->Count - 1;
                        SetAction();
                    }
                    else
                    {
                        NextMotion += FrameInterval;
                    }
                }
                break;

            case MirAction::Die:
                if (CMain::Time >= NextMotion)
                {
                    GameScene::Scene->MapControl->TextureValid = false;

                    if (SkipFrames)
                    {
                        UpdateFrame();
                    }

                    if (UpdateFrame() >= Frame->Count)
                    {
                        FrameIndex = Frame->Count - 1;
                        ActionFeed.clear();
                        QueuedAction *tempVar176 = new QueuedAction();
                        tempVar176->Action = MirAction::Dead;
                        tempVar176->Direction = Direction;
                        tempVar176->Location = CurrentLocation;
                        ActionFeed.push_back(tempVar176);
                        SetAction();

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar176' statement was not added since tempVar176 was passed to a method or constructor. Handle memory management manually.
                    }
                    else
                    {
                        switch (FrameIndex)
                        {
                            case 1:
                                switch (BaseImage)
                                {
                                    case Monster::PoisonHugger:
                                        Effect tempVar177(Libraries::Monsters[static_cast<unsigned short>(Monster::PoisonHugger)], 224, 5, Frame->Count * FrameInterval, this);
                                        Effects.push_back(&tempVar177);
                                        break;
                                    case Monster::Hugger:
                                        Effect tempVar178(Libraries::Monsters[static_cast<unsigned short>(Monster::Hugger)], 256, 8, Frame->Count * FrameInterval, this);
                                        Effects.push_back(&tempVar178);
                                        break;
                                    case Monster::MutatedHugger:
                                        Effect tempVar179(Libraries::Monsters[static_cast<unsigned short>(Monster::MutatedHugger)], 128, 7, Frame->Count * FrameInterval, this);
                                        Effects.push_back(&tempVar179);
                                        break;
                                    case Monster::CyanoGhast:
                                        Effect tempVar180(Libraries::Monsters[static_cast<unsigned short>(Monster::CyanoGhast)], 681, 7, Frame->Count * FrameInterval, this);
                                        Effects.push_back(&tempVar180);
                                        break;
                                }
                                break;
                            case 3:
                                PlayDeadSound();
                                switch (BaseImage)
                                {
                                    case Monster::BoneSpearman:
                                    case Monster::BoneBlademan:
                                    case Monster::BoneArcher:
                                        Effect tempVar181(Libraries::Monsters[static_cast<unsigned short>(Monster::BoneSpearman)], 224, 8, Frame->Count * FrameInterval, this);
                                        Effects.push_back(&tempVar181);
                                        break;
                                    case Monster::WoodBox:
                                        Effect *tempVar182 = new Effect(Libraries::Monsters[static_cast<unsigned short>(Monster::WoodBox)], 104, 6, 6 * Frame->Interval, this);
                                        tempVar182->Blend = true;
                                        Effects.push_back(tempVar182);
                                        break;

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar182' statement was not added since tempVar182 was passed to a method or constructor. Handle memory management manually.
                                }
                                break;
                        }

                        NextMotion += FrameInterval;
                    }
                }
                break;
            case MirAction::Revive:
                if (CMain::Time >= NextMotion)
                {
                    GameScene::Scene->MapControl->TextureValid = false;

                    if (SkipFrames)
                    {
                        UpdateFrame();
                    }

                    if (UpdateFrame() >= Frame->Count)
                    {
                        FrameIndex = Frame->Count - 1;
                        ActionFeed.clear();
                        QueuedAction *tempVar183 = new QueuedAction();
                        tempVar183->Action = MirAction::Standing;
                        tempVar183->Direction = Direction;
                        tempVar183->Location = CurrentLocation;
                        ActionFeed.push_back(tempVar183);
                        SetAction();

//C# TO C++ CONVERTER TODO TASK: A 'delete tempVar183' statement was not added since tempVar183 was passed to a method or constructor. Handle memory management manually.
                    }
                    else
                    {
                        if (FrameIndex == 3)
                        {
                            PlayReviveSound();
                        }
                        NextMotion += FrameInterval;
                    }
                }
                break;
            case MirAction::Dead:
                break;

        }

        if ((CurrentAction == MirAction::Standing || CurrentAction == MirAction::SitDown) && getNextAction() != nullptr)
        {
            SetAction();
        }
        else if (CurrentAction == MirAction::Dead && getNextAction() != nullptr && (getNextAction()->Action == MirAction::Skeleton || getNextAction()->Action == MirAction::Revive))
        {
            SetAction();
        }
    }

    int MonsterObject::UpdateFrame()
    {
        if (Frame == nullptr)
        {
            return 0;
        }

        if (Frame->Reverse)
        {
            return std::abs(--FrameIndex);
        }

        return ++FrameIndex;
    }

    Missile *MonsterObject::CreateProjectile(int baseIndex, MLibrary *library, bool blend, int count, int interval, int skip, int lightDistance, bool direction16, std::optional<Color*> &lightColour, unsigned int targetID)
    {
        if (targetID == 0)
        {
            targetID = TargetID;
        }

        MapObject *ob = MapControl::GetObject(targetID);

        auto targetPoint = TargetPoint;

        if (ob != nullptr)
        {
            targetPoint = ob->CurrentLocation;
        }

        int duration = Functions::MaxDistance(CurrentLocation, targetPoint) * 50;

        Missile *missile = new Missile(library, baseIndex, duration / interval, duration, this, targetPoint, direction16);
        missile->Target = ob;
        missile->Interval = interval;
        missile->FrameCount = count;
        missile->Blend = blend;
        missile->Skip = skip;
        missile->Light = lightDistance;
        missile->LightColour = !lightColour ? Color::White : static_cast<Color*>(lightColour);

        Effects.push_back(missile);

//C# TO C++ CONVERTER TODO TASK: A 'delete missile' statement was not added since missile was passed to a method or constructor. Handle memory management manually.
        return missile;
    }

    void MonsterObject::PlaySummonSound()
    {
        switch (BaseImage)
        {
            case Monster::HellKnight1:
            case Monster::HellKnight2:
            case Monster::HellKnight3:
            case Monster::HellKnight4:
                SoundManager::PlaySound(BaseSound + 0);
                return;
            case Monster::BoneFamiliar:
            case Monster::Shinsu:
            case Monster::HolyDeva:
                SoundManager::PlaySound(BaseSound + 5);
                return;
        }
    }

    void MonsterObject::PlayWalkSound(bool left)
    {
        if (left)
        {
            switch (BaseImage)
            {
                case Monster::WingedTigerLord:
                case Monster::PoisonHugger:
                    SoundManager::PlaySound(BaseSound + 8);
                    return;
            }
        }
        else
        {
            switch (BaseImage)
            {
                case Monster::WingedTigerLord:
                case Monster::AvengerPlant:
                    SoundManager::PlaySound(BaseSound + 8);
                    return;
                case Monster::PoisonHugger:
                    SoundManager::PlaySound(BaseSound + 9);
                    return;
            }
        }
    }

    void MonsterObject::PlayAppearSound()
    {
        switch (BaseImage)
        {
            case Monster::CannibalPlant:
            case Monster::EvilCentipede:
            case Monster::CreeperPlant:
                return;
            case Monster::ZumaArcher:
            case Monster::ZumaStatue:
            case Monster::ZumaGuardian:
            case Monster::RedThunderZuma:
            case Monster::FrozenRedZuma:
            case Monster::FrozenZumaStatue:
            case Monster::FrozenZumaGuardian:
            case Monster::ZumaTaurus:
            case Monster::DemonGuard:
            case Monster::Turtlegrass:
            case Monster::EarthGolem:
                if (Stoned)
                {
                    return;
                }
                break;
        }

        SoundManager::PlaySound(BaseSound);
    }

    void MonsterObject::PlayPopupSound()
    {
        switch (BaseImage)
        {
            case Monster::ZumaTaurus:
            case Monster::DigOutZombie:
            case Monster::Armadillo:
            case Monster::ArmadilloElder:
                SoundManager::PlaySound(BaseSound + 5);
                return;
            case Monster::Shinsu:
                SoundManager::PlaySound(BaseSound + 6);
                return;
        }
        SoundManager::PlaySound(BaseSound);
    }

    void MonsterObject::PlayRunSound()
    {
        switch (BaseImage)
        {
            case Monster::HardenRhino:
                SoundManager::PlaySound(BaseSound + 8);
                break;
        }
    }

    void MonsterObject::PlayJumpSound()
    {
        switch (BaseImage)
        {
            case Monster::Armadillo:
            case Monster::ArmadilloElder:
                SoundManager::PlaySound(BaseSound + 8);
                break;
        }
    }

    void MonsterObject::PlayFlinchSound()
    {
        switch (BaseImage)
        {
            default:
                SoundManager::PlaySound(BaseSound + 2);
                break;
        }
    }

    void MonsterObject::PlayStruckSound()
    {
        switch (StruckWeapon)
        {
            case 0:
            case 23:
            case 28:
            case 40:
                SoundManager::PlaySound(SoundList::StruckWooden);
                break;
            case 1:
            case 12:
                SoundManager::PlaySound(SoundList::StruckShort);
                break;
            case 2:
            case 8:
            case 11:
            case 15:
            case 18:
            case 20:
            case 25:
            case 31:
            case 33:
            case 34:
            case 37:
            case 41:
                SoundManager::PlaySound(SoundList::StruckSword);
                break;
            case 3:
            case 5:
            case 7:
            case 9:
            case 13:
            case 19:
            case 24:
            case 26:
            case 29:
            case 32:
            case 35:
                SoundManager::PlaySound(SoundList::StruckSword2);
                break;
            case 4:
            case 14:
            case 16:
            case 38:
                SoundManager::PlaySound(SoundList::StruckAxe);
                break;
            case 6:
            case 10:
            case 17:
            case 22:
            case 27:
            case 30:
            case 36:
            case 39:
                SoundManager::PlaySound(SoundList::StruckShort);
                break;
            case 21:
                SoundManager::PlaySound(SoundList::StruckClub);
                break;
        }
    }

    void MonsterObject::PlayAttackSound()
    {
        switch (BaseImage)
        {
            default:
                SoundManager::PlaySound(BaseSound + 1);
                break;
        }
    }

    void MonsterObject::PlaySecondAttackSound()
    {
        switch (BaseImage)
        {
            default:
                SoundManager::PlaySound(BaseSound + 6);
                break;

        }
    }

    void MonsterObject::PlayThirdAttackSound()
    {
        //SoundManager.PlaySound(BaseSound + 7);

        switch (BaseImage)
        {
            default:
                SoundManager::PlaySound(BaseSound + 7);
                break;
        }
    }

    void MonsterObject::PlayFourthAttackSound()
    {
        SoundManager::PlaySound(BaseSound + 8);
    }

    void MonsterObject::PlaySwingSound()
    {
        SoundManager::PlaySound(BaseSound + 4);
    }

    void MonsterObject::PlayDieSound()
    {
        switch (BaseImage)
        {
            default:
                SoundManager::PlaySound(BaseSound + 3);
                break;
        }
    }

    void MonsterObject::PlayDeadSound()
    {
        switch (BaseImage)
        {
            case Monster::CaveBat:
            case Monster::HellKnight1:
            case Monster::HellKnight2:
            case Monster::HellKnight3:
            case Monster::HellKnight4:
            case Monster::CyanoGhast:
            case Monster::WoodBox:
                SoundManager::PlaySound(BaseSound + 5);
                return;
        }
    }

    void MonsterObject::PlayReviveSound()
    {
        switch (BaseImage)
        {
            case Monster::ClZombie:
            case Monster::NdZombie:
            case Monster::CrawlerZombie:
                SoundManager::PlaySound(SoundList::ZombieRevive);
                return;
        }
    }

    void MonsterObject::PlayRangeSound()
    {
        switch (BaseImage)
        {
            case Monster::RedThunderZuma:
            case Monster::FrozenRedZuma:
            case Monster::KingScorpion:
            case Monster::DarkDevil:
            case Monster::Khazard:
            case Monster::BoneLord:
            case Monster::LeftGuard:
            case Monster::RightGuard:
            case Monster::FrostTiger:
            case Monster::GreatFoxSpirit:
            case Monster::BoneSpearman:
            case Monster::MinotaurKing:
            case Monster::WingedTigerLord:
            case Monster::ManectricClaw:
            case Monster::ManectricKing:
            case Monster::HellBolt:
            case Monster::WitchDoctor:
            case Monster::FlameSpear:
            case Monster::FlameMage:
            case Monster::FlameScythe:
            case Monster::FlameAssassin:
            case Monster::FlameQueen:
            case Monster::DarkDevourer:
            case Monster::DreamDevourer:
            case Monster::IceGuard:
            case Monster::ElementGuard:
            case Monster::KingGuard:
            case Monster::Yimoogi:
            case Monster::RedYimoogi:
            case Monster::Snake10:
            case Monster::Snake11:
            case Monster::Snake12:
            case Monster::Snake13:
            case Monster::Snake14:
            case Monster::Snake15:
            case Monster::Snake16:
            case Monster::Snake17:
            case Monster::BurningZombie:
            case Monster::MudZombie:
            case Monster::FrozenZombie:
            case Monster::UndeadWolf:
            case Monster::CatShaman:
            case Monster::CannibalTentacles:
            case Monster::SwampWarrior:
            case Monster::GeneralMeowMeow:
            case Monster::RhinoPriest:
            case Monster::HardenRhino:
            case Monster::TreeGuardian:
            case Monster::OmaCannibal:
            case Monster::OmaMage:
            case Monster::CreeperPlant:
            case Monster::AvengingSpirit:
            case Monster::AvengingWarrior:
            case Monster::PeacockSpider:
                SoundManager::PlaySound(BaseSound + 5);
                return;
            case Monster::AncientBringer:
            case Monster::SeedingsGeneral:
                SoundManager::PlaySound(BaseSound + 7);
                return;
            case Monster::RestlessJar:
                SoundManager::PlaySound(BaseSound + 8);
                return;
            case Monster::TucsonGeneral:
                return;
            default:
                PlayAttackSound();
                return;
        }
    }

    void MonsterObject::PlaySecondRangeSound()
    {
        switch (BaseImage)
        {
            case Monster::TucsonGeneral:
                SoundManager::PlaySound(BaseSound + 5);
                return;
            case Monster::TurtleKing:
                return;
            case Monster::KingGuard:
            case Monster::TreeGuardian:
                SoundManager::PlaySound(BaseSound + 7);
                return;
            case Monster::AncientBringer:
            case Monster::SeedingsGeneral:
                SoundManager::PlaySound(BaseSound + 8);
                return;
            default:
                PlaySecondAttackSound();
                return;
        }
    }

    void MonsterObject::PlayThirdRangeSound()
    {
        switch (BaseImage)
        {
            case Monster::TucsonGeneral:
                SoundManager::PlaySound(BaseSound + 7);
                return;
            default:
                PlayThirdAttackSound();
                return;
        }
    }

    void MonsterObject::PlayPickupSound()
    {
        SoundManager::PlaySound(SoundList::PetPickup);
    }

    void MonsterObject::PlayPetSound()
    {
        int petSound = static_cast<unsigned short>(BaseImage) - 10000 + 10500;

        switch (BaseImage)
        {
            case Monster::Chick:
            case Monster::BabyPig:
            case Monster::Kitten:
            case Monster::BabySkeleton:
            case Monster::Baekdon:
            case Monster::Wimaen:
            case Monster::BlackKitten:
            case Monster::BabyDragon:
            case Monster::OlympicFlame:
            case Monster::BabySnowMan:
            case Monster::Frog:
            case Monster::BabyMonkey:
            case Monster::AngryBird:
            case Monster::Foxey:
            case Monster::MedicalRat:
                SoundManager::PlaySound(petSound);
                break;
        }
    }

    void MonsterObject::Draw()
    {
        DrawBehindEffects(Settings::Effect);

        float oldOpacity = DXManager::Opacity;
        if (Hidden && !DXManager::Blending)
        {
            DXManager::SetOpacity(0.5F);
        }

        if (BodyLibrary == nullptr || Frame == nullptr)
        {
            return;
        }

        if (!DXManager::Blending && Frame->Blend)
        {
            BodyLibrary->DrawBlend(DrawFrame, DrawLocation, DrawColour, true);
        }
        else
        {
            BodyLibrary->Draw(DrawFrame, DrawLocation, DrawColour, true);
        }

        DXManager::SetOpacity(oldOpacity);
    }

    bool MonsterObject::MouseOver(Point *p)
    {
        return MapControl::getMapLocation() == CurrentLocation || BodyLibrary != nullptr && BodyLibrary->VisiblePixel(DrawFrame, Functions::Subtract(p, FinalDrawLocation), false);
    }

    void MonsterObject::DrawBehindEffects(bool effectsEnabled)
    {
        for (int i = 0; i < Effects.size(); i++)
        {
            if (!Effects[i]->DrawBehind)
            {
                continue;
            }
            Effects[i]->Draw();
        }
    }

    void MonsterObject::DrawEffects(bool effectsEnabled)
    {
        if (!effectsEnabled)
        {
            return;
        }

        for (int i = 0; i < Effects.size(); i++)
        {
            if (Effects[i]->DrawBehind)
            {
                continue;
            }
            Effects[i]->Draw();
        }

        switch (BaseImage)
        {
            case Monster::Scarecrow:
                switch (CurrentAction)
                {
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::Scarecrow)]->DrawBlend(224 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::CaveMaggot:
                switch (CurrentAction)
                {
                    case MirAction::Attack1:
                        if (FrameIndex >= 1)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::CaveMaggot)]->DrawBlend(175 + FrameIndex + static_cast<int>(Direction) * 5, DrawLocation, Color::White, true);
                        }
                        break;
                }
                break;
            case Monster::Skeleton:
            case Monster::BoneFighter:
            case Monster::AxeSkeleton:
            case Monster::BoneWarrior:
            case Monster::BoneElite:
            case Monster::BoneWhoo:
                switch (CurrentAction)
                {
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::Skeleton)]->DrawBlend(224 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::WoomaTaurus:
                switch (CurrentAction)
                {
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::WoomaTaurus)]->DrawBlend(224 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::Dung:
                switch (CurrentAction)
                {
                    case MirAction::Attack1:
                        if (FrameIndex >= 1)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::Dung)]->DrawBlend(223 + FrameIndex + static_cast<int>(Direction) * 5, DrawLocation, Color::White, true);
                        }
                        break;
                }
                break;
            case Monster::WedgeMoth:
                switch (CurrentAction)
                {
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::WedgeMoth)]->DrawBlend(224 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::RedThunderZuma:
            case Monster::FrozenRedZuma:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::RedThunderZuma)]->DrawBlend(320 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                    case MirAction::Pushed:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::RedThunderZuma)]->DrawBlend(352 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::RedThunderZuma)]->DrawBlend(400 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::RedThunderZuma)]->DrawBlend(448 + FrameIndex + static_cast<int>(Direction) * 2, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::RedThunderZuma)]->DrawBlend(464 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::KingHog:
                switch (CurrentAction)
                {
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::KingHog)]->DrawBlend(224 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::DarkDevil:
                switch (CurrentAction)
                {
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::DarkDevil)]->DrawBlend(342 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::BoneLord:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::BoneLord)]->DrawBlend(400 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                    case MirAction::Pushed:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::BoneLord)]->DrawBlend(432 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::BoneLord)]->DrawBlend(480 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::BoneLord)]->DrawBlend(528 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::BoneLord)]->DrawBlend(576 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::BoneLord)]->DrawBlend(624 + FrameIndex + static_cast<int>(Direction) * 2, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::BoneLord)]->DrawBlend(640 + FrameIndex + static_cast<int>(Direction) * 20, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::HolyDeva:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::HolyDeva)]->Draw(226 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                    case MirAction::Pushed:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::HolyDeva)]->Draw(258 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::HolyDeva)]->Draw(306 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::HolyDeva)]->Draw(354 + FrameIndex + static_cast<int>(Direction) * 2, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        if (FrameIndex <= 6)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::HolyDeva)]->Draw(370 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        }
                        break;
                    case MirAction::Appear:
                        if (FrameIndex >= 5)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::HolyDeva)]->Draw(418 + FrameIndex - 5, DrawLocation, Color::White, true);
                        }
                        break;
                }
                break;
            case Monster::YinDevilNode:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::YinDevilNode)]->DrawBlend(22 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::YangDevilNode:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::YangDevilNode)]->DrawBlend(22 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::OmaKing:
                switch (CurrentAction)
                {
                    case MirAction::Attack1:
                        if (FrameIndex >= 3)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::OmaKing)]->DrawBlend((624 + FrameIndex + static_cast<int>(Direction) * 4) - 3, DrawLocation, Color::White, true);
                        }
                        break;
                    case MirAction::Attack2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::OmaKing)]->DrawBlend(656 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::OmaKing)]->DrawBlend(304 + FrameIndex + static_cast<int>(Direction) * 20, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::BlackFoxman:
                switch (CurrentAction)
                {
                    case MirAction::Attack2:
                        if (FrameIndex >= 3)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::BlackFoxman)]->DrawBlend((234 + FrameIndex + static_cast<int>(Direction) * 4) - 3, DrawLocation, Color::White, true);
                        }
                        break;
                }
                break;

            case Monster::ManectricKing:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::ManectricKing)]->DrawBlend(360 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::ManectricKing)]->DrawBlend(392 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::ManectricKing)]->DrawBlend(440 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::ManectricKing)]->DrawBlend(576 + FrameIndex + static_cast<int>(Direction) * 8, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::ManectricKing)]->DrawBlend(488 + FrameIndex + static_cast<int>(Direction) * 2, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::ManectricStaff:
                switch (CurrentAction)
                {
                    case MirAction::Attack2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::ManectricStaff)]->DrawBlend(296 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::ManectricBlest:
                switch (CurrentAction)
                {
                    case MirAction::Attack2:
                        if (FrameIndex >= 4)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::ManectricBlest)]->DrawBlend((328 + FrameIndex + static_cast<int>(Direction) * 4) - 4, DrawLocation, Color::White, true);
                        }
                        break;
                    case MirAction::Attack3:
                        if (FrameIndex >= 2)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::ManectricBlest)]->DrawBlend((360 + FrameIndex + static_cast<int>(Direction) * 5) - 2, DrawLocation, Color::White, true);
                        }
                        break;
                }
                break;
            case Monster::KingGuard:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::KingGuard)]->DrawBlend(392 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::KingGuard)]->DrawBlend(424 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::KingGuard)]->DrawBlend(472 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::KingGuard)]->DrawBlend(616 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Pushed:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::KingGuard)]->DrawBlend(352 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::KingGuard)]->DrawBlend(520 + FrameIndex + static_cast<int>(Direction) * 2, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::KingGuard)]->DrawBlend(664 + FrameIndex + static_cast<int>(Direction) * 8, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::KingGuard)]->DrawBlend(728 + FrameIndex + static_cast<int>(Direction) * 7, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::Jar2:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::Jar2)]->DrawBlend(312 + FrameIndex + static_cast<int>(Direction) * 10, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::Jar2)]->DrawBlend(392 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::Jar2)]->DrawBlend(440 + FrameIndex + static_cast<int>(Direction) * 10, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::Jar2)]->DrawBlend(520 + FrameIndex + static_cast<int>(Direction) * 3, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::Jar2)]->DrawBlend(544 + FrameIndex + static_cast<int>(Direction) * 10, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::SeedingsGeneral:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::SeedingsGeneral)]->DrawBlend(536 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::SeedingsGeneral)]->DrawBlend(568 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::SeedingsGeneral)]->DrawBlend(704 + FrameIndex + static_cast<int>(Direction) * 9, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::SeedingsGeneral)]->DrawBlend(776 + FrameIndex + static_cast<int>(Direction) * 9, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Dead:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::SeedingsGeneral)]->DrawBlend(1015 + FrameIndex + static_cast<int>(Direction) * 1, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::SeedingsGeneral)]->DrawBlend(984 + FrameIndex + static_cast<int>(Direction) * 3, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::SeedingsGeneral)]->DrawBlend(1008 + FrameIndex + static_cast<int>(Direction) * 8, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::SeedingsGeneral)]->DrawBlend(848 + FrameIndex + static_cast<int>(Direction) * 8, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::SeedingsGeneral)]->DrawBlend(912 + FrameIndex + static_cast<int>(Direction) * 9, DrawLocation, Color::White, true);
                        break;
                }
                break;

            case Monster::HellSlasher:
                switch (CurrentAction)
                {
                    case MirAction::Attack1:
                        if (FrameIndex >= 2 && FrameIndex < 6)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::HellSlasher)]->DrawBlend((304 + FrameIndex + static_cast<int>(Direction) * 4) - 2, DrawLocation, Color::White, true);
                        }
                        break;
                }
                break;

            case Monster::HellPirate:
                switch (CurrentAction)
                {
                    case MirAction::Attack2:
                        if (FrameIndex >= 3)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::HellPirate)]->DrawBlend((280 + FrameIndex + static_cast<int>(Direction) * 4) - 3, DrawLocation, Color::White, true);
                        }
                        break;
                }
                break;

            case Monster::HellCannibal:
                switch (CurrentAction)
                {
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::HellCannibal)]->DrawBlend(304 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                }
                break;

            case Monster::HellKeeper:
                switch (CurrentAction)
                {
                    case MirAction::Attack2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::HellKeeper)]->DrawBlend(40 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::Manticore:
                switch (CurrentAction)
                {
                    case MirAction::Attack2:
                        if (FrameIndex >= 3)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::Manticore)]->DrawBlend((536 + FrameIndex + static_cast<int>(Direction) * 4) - 3, DrawLocation, Color::White, true);
                        }
                        break;
                }
                break;
            case Monster::GuardianRock:
                switch (CurrentAction)
                {
                    case MirAction::AttackRange1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::GuardianRock)]->DrawBlend(8 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::ThunderElement:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::ThunderElement)]->DrawBlend(44 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                    case MirAction::Pushed:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::ThunderElement)]->DrawBlend(54 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::ThunderElement)]->DrawBlend(64 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::ThunderElement)]->DrawBlend(74 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::ThunderElement)]->DrawBlend(78 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::CloudElement:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CloudElement)]->DrawBlend(44 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                    case MirAction::Pushed:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CloudElement)]->DrawBlend(54 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CloudElement)]->DrawBlend(64 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CloudElement)]->DrawBlend(74 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CloudElement)]->DrawBlend(78 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::GreatFoxSpirit:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::GreatFoxSpirit)]->DrawBlend(Frame->Start + 30 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                    case MirAction::AttackRange1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::GreatFoxSpirit)]->DrawBlend(Frame->Start + 30 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::GreatFoxSpirit)]->DrawBlend(Frame->Start + 30 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::GreatFoxSpirit)]->DrawBlend(318 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::TaoistGuard:
                switch (CurrentAction)
                {
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::TaoistGuard)]->DrawBlend(80 + (static_cast<int>(Direction) * 3) + FrameIndex, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::CyanoGhast: //mob glow effect
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CyanoGhast)]->DrawBlend(448 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CyanoGhast)]->DrawBlend(480 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CyanoGhast)]->DrawBlend(528 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CyanoGhast)]->DrawBlend(576 + FrameIndex + static_cast<int>(Direction) * 2, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                    case MirAction::Revive:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CyanoGhast)]->DrawBlend(592 + FrameIndex + static_cast<int>(Direction) * 10, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::MutatedManworm:
                switch (CurrentAction)
                {
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::MutatedManworm)]->DrawBlend(285 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::MutatedManworm)]->DrawBlend(333 + FrameIndex + static_cast<int>(Direction) * 8, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::CrazyManworm:
                switch (CurrentAction)
                {
                    case MirAction::Attack2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CrazyManworm)]->DrawBlend(272 + FrameIndex + static_cast<int>(Direction) * 8, DrawLocation, Color::White, true);
                        break;
                }
                break;

            case Monster::Behemoth:
                switch (CurrentAction)
                {
                    case MirAction::Walking:
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::Behemoth)]->DrawBlend(464 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Standing:
                    case MirAction::Revive:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::Behemoth)]->DrawBlend(512 + FrameIndex + static_cast<int>(Direction) * 10, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack2:
                    case MirAction::Attack3:
                    case MirAction::AttackRange1:
                    case MirAction::AttackRange2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::Behemoth)]->DrawBlend(592 + FrameIndex + static_cast<int>(Direction) * 7, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        if (FrameIndex >= 4)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::Behemoth)]->DrawBlend((667 + FrameIndex + static_cast<int>(Direction) * 2) - 4, DrawLocation, Color::White, true);
                        }
                        Libraries::Monsters[static_cast<unsigned short>(Monster::Behemoth)]->DrawBlend(592 + FrameIndex + static_cast<int>(Direction) * 7, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        if (FrameIndex >= 1)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::Behemoth)]->DrawBlend(658 + FrameIndex - 1, DrawLocation, Color::White, true);
                        }
                        break;
                }

                if (CurrentAction != MirAction::Dead)
                {
                    Libraries::Monsters[static_cast<unsigned short>(Monster::Behemoth)]->DrawBlend(648 + FrameIndex, DrawLocation, Color::White, true);
                }
                break;

            case Monster::DarkDevourer:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::DarkDevourer)]->DrawBlend(272 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::DarkDevourer)]->DrawBlend(304 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::DarkDevourer)]->DrawBlend(352 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::DarkDevourer)]->DrawBlend(540 + FrameIndex + static_cast<int>(Direction) * 8, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::DarkDevourer)]->DrawBlend(400 + FrameIndex + static_cast<int>(Direction) * 2, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                    case MirAction::Revive:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::DarkDevourer)]->DrawBlend(416 + FrameIndex + static_cast<int>(Direction) * 8, DrawLocation, Color::White, true);
                        break;
                }
                break;

            case Monster::DreamDevourer:
                switch (CurrentAction)
                {
                    case MirAction::AttackRange1:
                        if (FrameIndex >= 3)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::DreamDevourer)]->DrawBlend(320 + (FrameIndex + static_cast<int>(Direction) * 5) - 3, DrawLocation, Color::White, true);
                        }
                        break;
                }
                break;

            case Monster::TurtleKing:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::TurtleKing)]->DrawBlend(456 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::TurtleKing)]->DrawBlend(488 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::TurtleKing)]->DrawBlend(536 + FrameIndex + static_cast<int>(Direction) * 10, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::TurtleKing)]->DrawBlend(616 + FrameIndex + static_cast<int>(Direction) * 2, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                    case MirAction::Revive:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::TurtleKing)]->DrawBlend(632 + FrameIndex + static_cast<int>(Direction) * 9, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::TurtleKing)]->DrawBlend(704 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::TurtleKing)]->DrawBlend(752 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::TurtleKing)]->DrawBlend(800 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange3:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::TurtleKing)]->DrawBlend(848 + FrameIndex + static_cast<int>(Direction) * 8, DrawLocation, Color::White, true);
                        break;
                }
                break;

            case Monster::WingedTigerLord:
                switch (CurrentAction)
                {
                    case MirAction::Attack1:
                        if (FrameIndex >= 2)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::WingedTigerLord)]->DrawBlend(584 + (FrameIndex + static_cast<int>(Direction) * 6) - 2, DrawLocation, Color::White, true);
                        }
                        break;
                    case MirAction::Attack2:
                        if (FrameIndex >= 2)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::WingedTigerLord)]->DrawBlend(560 + (FrameIndex + static_cast<int>(Direction) * 3) - 2, DrawLocation, Color::White, true);
                        }
                        break;
                }
                break;
            case Monster::StoningStatue:
                switch (CurrentAction)
                {
                    case MirAction::Attack1:
                        if (FrameIndex == 4)
                        {
                            SoundManager::PlaySound(BaseSound + 5);
                        }
                        break;
                    case MirAction::Attack2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::StoningStatue)]->DrawBlend(464 + FrameIndex + static_cast<int>(Direction) * 20, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::FlameSpear:
            case Monster::FlameMage:
            case Monster::FlameScythe:
            case Monster::FlameAssassin:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(BaseImage)]->DrawBlend(272 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                        Libraries::Monsters[static_cast<unsigned short>(BaseImage)]->DrawBlend(304 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(BaseImage)]->DrawBlend(352 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(BaseImage)]->DrawBlend(400 + FrameIndex + static_cast<int>(Direction) * 2, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(BaseImage)]->DrawBlend(416 + FrameIndex + static_cast<int>(Direction) * 10, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange1:
                        Libraries::Monsters[static_cast<unsigned short>(BaseImage)]->DrawBlend(496 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        if (BaseImage == Monster::FlameScythe && static_cast<int>(Direction) > 0)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(BaseImage)]->DrawBlend(544 + FrameIndex + static_cast<int>(Direction) * 6 - 6, DrawLocation, Color::White, true);
                        }
                        else if (BaseImage == Monster::FlameAssassin)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(BaseImage)]->DrawBlend(544 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        }
                        break;
                }
                break;
            case Monster::FlameQueen:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::FlameQueen)]->DrawBlend(360 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::FlameQueen)]->DrawBlend(392 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::FlameQueen)]->DrawBlend(440 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::FlameQueen)]->DrawBlend(488 + FrameIndex + static_cast<int>(Direction) * 2, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::FlameQueen)]->DrawBlend(504 + FrameIndex + static_cast<int>(Direction) * 10, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::FlameQueen)]->DrawBlend(584 + FrameIndex + static_cast<int>(Direction) * 9, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::HellKnight1:
            case Monster::HellKnight2:
            case Monster::HellKnight3:
            case Monster::HellKnight4:
                switch (CurrentAction)
                {
                    case MirAction::Appear:
                        Libraries::Monsters[static_cast<unsigned short>(BaseImage)]->DrawBlend(224 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(BaseImage)]->DrawBlend(224 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                        Libraries::Monsters[static_cast<unsigned short>(BaseImage)]->DrawBlend(256 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(BaseImage)]->DrawBlend(304 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(BaseImage)]->DrawBlend(352 + FrameIndex + static_cast<int>(Direction) * 2, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(BaseImage)]->DrawBlend(368 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack2:
                        Libraries::Monsters[static_cast<unsigned short>(BaseImage)]->DrawBlend(400 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::HellLord:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                    case MirAction::Attack1:
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::HellLord)]->Draw(15, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::HellLord)]->Draw(16 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Dead:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::HellLord)]->Draw(20, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::WaterGuard:
                switch (CurrentAction)
                {
                    case MirAction::Attack2:
                        if (FrameIndex >= 4)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::WaterGuard)]->DrawBlend(264 + (FrameIndex + static_cast<int>(Direction) * 3) - 4, DrawLocation, Color::White, true);
                        }
                        break;
                }
                break;
            case Monster::HardenRhino:
                switch (CurrentAction)
                {
                    case MirAction::Running:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::HardenRhino)]->DrawBlend(397 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::AncientBringer:
                switch (CurrentAction)
                {
                    case MirAction::AttackRange1:
                        if (FrameIndex >= 3)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::AncientBringer)]->DrawBlend((648 + FrameIndex + static_cast<int>(Direction) * 5) - 3, DrawLocation, Color::White, true);
                        }
                        break; //on mob
                    case MirAction::AttackRange2:
                        if (FrameIndex >= 3)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::AncientBringer)]->DrawBlend((730 + FrameIndex + static_cast<int>(Direction) * 10) - 3, DrawLocation, Color::White, true);
                        }
                        break; //on mob
                }
                break;
            case Monster::BurningZombie:
                switch (CurrentAction)
                {
                    case MirAction::AttackRange1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::BurningZombie)]->DrawBlend(352 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::MudZombie:
                switch (CurrentAction)
                {
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::MudZombie)]->DrawBlend(304 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::BlackHammerCat:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::BlackHammerCat)]->DrawBlend(336 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::BlackHammerCat)]->DrawBlend(368 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::BlackHammerCat)]->DrawBlend(416 + FrameIndex + static_cast<int>(Direction) * 7, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::BlackHammerCat)]->DrawBlend(472 + FrameIndex + static_cast<int>(Direction) * 12, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::BlackHammerCat)]->DrawBlend(568 + FrameIndex + static_cast<int>(Direction) * 3, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::BlackHammerCat)]->DrawBlend(589 + FrameIndex + static_cast<int>(Direction) * 7, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::StrayCat:
                switch (CurrentAction)
                {
                    case MirAction::Attack3:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::StrayCat)]->DrawBlend(632 + FrameIndex + static_cast<int>(Direction) * 12, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::CatShaman:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CatShaman)]->DrawBlend(360 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CatShaman)]->DrawBlend(392 + FrameIndex + static_cast<int>(Direction) * 10, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CatShaman)]->DrawBlend(472 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CatShaman)]->DrawBlend(520 + FrameIndex + static_cast<int>(Direction) * 7, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CatShaman)]->DrawBlend(576 + FrameIndex + static_cast<int>(Direction) * 7, DrawLocation, Color::White, true);
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CatShaman)]->DrawBlend(746 + FrameIndex, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CatShaman)]->DrawBlend(632 + FrameIndex + static_cast<int>(Direction) * 2, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::CatShaman)]->DrawBlend(648 + FrameIndex + static_cast<int>(Direction) * 9, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::TucsonGeneral:
                switch (CurrentAction)
                {
                    case MirAction::Attack1:
                        if (FrameIndex >= 2)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::TucsonGeneral)]->DrawBlend((504 + FrameIndex + static_cast<int>(Direction) * 5) - 2, DrawLocation, Color::White, true);
                        }
                        break;
                }
                break;
            case Monster::RhinoWarrior:
                switch (CurrentAction)
                {
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::RhinoWarrior)]->DrawBlend(320 + FrameIndex + static_cast<int>(Direction) * 7, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::TreeGuardian:
                switch (CurrentAction)
                {
                    case MirAction::Attack2:
                        if (FrameIndex >= 5)
                        {
                            Libraries::Monsters[static_cast<unsigned short>(Monster::TreeGuardian)]->DrawBlend(608 + FrameIndex + static_cast<int>(Direction) * 5, DrawLocation, Color::White, true);
                        }
                        break;
                }
                break;
            case Monster::OmaWitchDoctor:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::OmaWitchDoctor)]->DrawBlend(400 + FrameIndex + static_cast<int>(Direction) * 9, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::OmaWitchDoctor)]->DrawBlend(472 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::OmaWitchDoctor)]->DrawBlend(520 + FrameIndex + static_cast<int>(Direction) * 7, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::OmaWitchDoctor)]->DrawBlend(576 + FrameIndex + static_cast<int>(Direction) * 7, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::OmaWitchDoctor)]->DrawBlend(632 + FrameIndex + static_cast<int>(Direction) * 9, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::OmaWitchDoctor)]->DrawBlend(704 + FrameIndex + static_cast<int>(Direction) * 3, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::OmaWitchDoctor)]->DrawBlend(727 + FrameIndex + static_cast<int>(Direction) * 8, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::PlagueCrab:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::PlagueCrab)]->DrawBlend(248 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::PlagueCrab)]->DrawBlend(280 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::PlagueCrab)]->DrawBlend(328 + FrameIndex + static_cast<int>(Direction) * 8, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::PlagueCrab)]->DrawBlend(392 + FrameIndex + static_cast<int>(Direction) * 3, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::PlagueCrab)]->DrawBlend(423 + FrameIndex + static_cast<int>(Direction) * 7, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::FrozenGolem:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenGolem)]->DrawBlend(264 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenGolem)]->DrawBlend(296 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenGolem)]->DrawBlend(344 + FrameIndex + static_cast<int>(Direction) * 8, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::FrozenGolem)]->DrawBlend(408 + FrameIndex + static_cast<int>(Direction) * 12, DrawLocation, Color::White, true);
                        break;
                }
                break;
            case Monster::IcePhantom:
                switch (CurrentAction)
                {
                    case MirAction::Standing:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::IcePhantom)]->DrawBlend(320 + FrameIndex + static_cast<int>(Direction) * 4, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Walking:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::IcePhantom)]->DrawBlend(352 + FrameIndex + static_cast<int>(Direction) * 6, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Attack1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::IcePhantom)]->DrawBlend(400 + FrameIndex + static_cast<int>(Direction) * 9, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::IcePhantom)]->DrawBlend(472 + FrameIndex + static_cast<int>(Direction) * 8, DrawLocation, Color::White, true);
                        break;
                    case MirAction::AttackRange2:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::IcePhantom)]->DrawBlend(472 + FrameIndex + static_cast<int>(Direction) * 8, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Struck:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::IcePhantom)]->DrawBlend(536 + FrameIndex + static_cast<int>(Direction) * 3, DrawLocation, Color::White, true);
                        break;
                    case MirAction::Die:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::IcePhantom)]->DrawBlend(560 + FrameIndex + static_cast<int>(Direction) * 10, DrawLocation, Color::White, true);
                        break;
                }
                break;

            case Monster::HornedMage:
            {
                    switch (CurrentAction)
                    {
                        case MirAction::Standing:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::HornedMage)]->DrawBlend((384 + FrameIndex + static_cast<int>(Direction) * 4), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Walking:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::HornedMage)]->DrawBlend((416 + FrameIndex + static_cast<int>(Direction) * 6), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Attack1:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::HornedMage)]->DrawBlend((464 + FrameIndex + static_cast<int>(Direction) * 8), DrawLocation, Color::White, true);
                            break;
                        case MirAction::AttackRange1:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::HornedMage)]->DrawBlend((528 + FrameIndex + static_cast<int>(Direction) * 9), DrawLocation, Color::White, true);
                            break;
                        case MirAction::AttackRange2:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::HornedMage)]->DrawBlend((600 + FrameIndex + static_cast<int>(Direction) * 8), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Struck:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::HornedMage)]->DrawBlend((664 + FrameIndex + static_cast<int>(Direction) * 3), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Die:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::HornedMage)]->DrawBlend((688 + FrameIndex + static_cast<int>(Direction) * 10), DrawLocation, Color::White, true);
                            break;
                    }
            }
                break;
            case Monster::Kirin:
            {
                    switch (CurrentAction)
                    {
                        case MirAction::Standing:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::Kirin)]->DrawBlend((392 + FrameIndex + static_cast<int>(Direction) * 4), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Walking:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::Kirin)]->DrawBlend((496 + FrameIndex + static_cast<int>(Direction) * 6), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Attack1:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::Kirin)]->DrawBlend((544 + FrameIndex + static_cast<int>(Direction) * 7), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Attack2:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::Kirin)]->DrawBlend((600 + FrameIndex + static_cast<int>(Direction) * 12), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Attack3:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::Kirin)]->DrawBlend((696 + FrameIndex + static_cast<int>(Direction) * 6), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Struck:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::Kirin)]->DrawBlend((744 + FrameIndex + static_cast<int>(Direction) * 3), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Die:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::Kirin)]->DrawBlend((744 + FrameIndex + static_cast<int>(Direction) * 1) - 1, DrawLocation, Color::White, true);
                            break;
                    }
            }
                break;
            case Monster::DarkWraith:
            {
                    switch (CurrentAction)
                    {
                        case MirAction::Standing:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::DarkWraith)]->DrawBlend((360 + FrameIndex + static_cast<int>(Direction) * 4), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Walking:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::DarkWraith)]->DrawBlend((392 + FrameIndex + static_cast<int>(Direction) * 6), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Attack1:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::DarkWraith)]->DrawBlend((440 + FrameIndex + static_cast<int>(Direction) * 8), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Attack2:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::DarkWraith)]->DrawBlend((504 + FrameIndex + static_cast<int>(Direction) * 10), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Attack3:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::DarkWraith)]->DrawBlend((584 + FrameIndex + static_cast<int>(Direction) * 4), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Struck:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::DarkWraith)]->DrawBlend((616 + FrameIndex + static_cast<int>(Direction) * 3), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Die:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::DarkWraith)]->DrawBlend((640 + FrameIndex + static_cast<int>(Direction) * 10), DrawLocation, Color::White, true);
                            break;

                    }
                    break;
            }
            case Monster::DarkSpirit:
            {
                    switch (CurrentAction)
                    {
                        case MirAction::Standing:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::DarkSpirit)]->DrawBlend((256 + FrameIndex + static_cast<int>(Direction) * 4), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Walking:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::DarkSpirit)]->DrawBlend((288 + FrameIndex + static_cast<int>(Direction) * 6), DrawLocation, Color::White, true);
                            break;
                        case MirAction::AttackRange1:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::DarkSpirit)]->DrawBlend((336 + FrameIndex + static_cast<int>(Direction) * 9), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Struck:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::DarkSpirit)]->DrawBlend((408 + FrameIndex + static_cast<int>(Direction) * 3), DrawLocation, Color::White, true);
                            break;
                        case MirAction::Die:
                            Libraries::Monsters[static_cast<unsigned short>(Monster::DarkSpirit)]->DrawBlend((432 + FrameIndex + static_cast<int>(Direction) * 10), DrawLocation, Color::White, true);
                            break;
                    }
                    break;
            }
            case Monster::FloatingRock:
                switch (CurrentAction)
                {
                    case MirAction::AttackRange1:
                        Libraries::Monsters[static_cast<unsigned short>(Monster::FloatingRock)]->DrawBlend(215 + FrameIndex + 10, DrawLocation, Color::White, true);
                        break;
                }
                break;

        } //END OF DRAW EFFECTS
    }

    void MonsterObject::DrawName()
    {
        if (!Name.find("_") != std::string::npos)
        {
            MapObject::DrawName();
            return;
        }

        std::vector<std::string> splitName = StringHelper::split(Name, '_');

        //IntelligentCreature
        int yOffset = 0;
        switch (BaseImage)
        {
            case Monster::Chick:
                yOffset = -10;
                break;
            case Monster::BabyPig:
            case Monster::Kitten:
            case Monster::BabySkeleton:
            case Monster::Baekdon:
            case Monster::Wimaen:
            case Monster::BlackKitten:
            case Monster::BabyDragon:
            case Monster::OlympicFlame:
            case Monster::BabySnowMan:
            case Monster::Frog:
            case Monster::BabyMonkey:
            case Monster::AngryBird:
            case Monster::Foxey:
            case Monster::MedicalRat:
                yOffset = -20;
                break;
        }

        for (int s = 0; s < splitName.Count(); s++)
        {
            CreateMonsterLabel(splitName[s], s);

            TempLabel->setText(splitName[s]);
            Point tempVar(DisplayRectangle->X + (48 - TempLabel->getSize()->Width) / 2, DisplayRectangle->Y - (32 - TempLabel->getSize()->Height / 2) + (Dead ? 35 : 8) - (((splitName.Count() - 1) * 10) / 2) + (s * 12) + yOffset);
            TempLabel->setLocation(&tempVar);
            TempLabel->Draw();
        }
    }

    void MonsterObject::CreateMonsterLabel(const std::string &word, int wordOrder)
    {
        TempLabel = nullptr;

        for (int i = 0; i < LabelList.size(); i++)
        {
            if (LabelList[i]->getText() != word)
            {
                continue;
            }
            TempLabel = LabelList[i];
            break;
        }

        if (TempLabel != nullptr && !TempLabel->isDisposed() && NameColour == OldNameColor)
        {
            return;
        }

        OldNameColor = NameColour;

        TempLabel = new MirLabel();
        TempLabel->setAutoSize(true);
        TempLabel->setBackColour(Color::Transparent);
        TempLabel->setForeColour(NameColour);
        TempLabel->setOutLine(true);
        TempLabel->setOutLineColour(Color::Black);
        TempLabel->setText(word);

        TempLabel->Disposing->addListener([&] (o, e)
        {
            return LabelList.Remove(TempLabel);
        });
        LabelList.push_back(TempLabel);
    }

    void MonsterObject::DrawChat()
    {
        if (ChatLabel == nullptr || ChatLabel->isDisposed())
        {
            return;
        }

        if (CMain::Time > ChatTime)
        {
            ChatLabel->Dispose();
            ChatLabel = nullptr;
            return;
        }

        //IntelligentCreature
        int yOffset = 0;
        switch (BaseImage)
        {
            case Monster::Chick:
                yOffset = 30;
                break;
            case Monster::BabyPig:
            case Monster::Kitten:
            case Monster::BabySkeleton:
            case Monster::Baekdon:
            case Monster::Wimaen:
            case Monster::BlackKitten:
            case Monster::BabyDragon:
            case Monster::OlympicFlame:
            case Monster::BabySnowMan:
            case Monster::Frog:
            case Monster::BabyMonkey:
            case Monster::AngryBird:
            case Monster::Foxey:
            case Monster::MedicalRat:
                yOffset = 20;
                break;
        }

        ChatLabel->setForeColour(Dead ? Color::Gray : Color::White);
        Point tempVar(DisplayRectangle->X + (48 - ChatLabel->getSize()->Width) / 2, DisplayRectangle->Y - (60 + ChatLabel->getSize()->Height) - (Dead ? 35 : 0) + yOffset);
        ChatLabel->setLocation(&tempVar);
        ChatLabel->Draw();
    }
}
